diff options
author | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2014-10-29 12:20:09 +0100 |
---|---|---|
committer | Baptiste DURAND <baptiste.durand@open.eurogiciel.org> | 2014-10-29 12:29:48 +0100 |
commit | 5a4df56a9c6eba36b56e9ffd042674b9255720ac (patch) | |
tree | d20f25e59c73222deeda87082260022aedf719b3 | |
parent | 654036a7915fbd0097e34d17d573dfd1cba5829a (diff) | |
download | aul-1-5a4df56a9c6eba36b56e9ffd042674b9255720ac.tar.gz aul-1-5a4df56a9c6eba36b56e9ffd042674b9255720ac.tar.bz2 aul-1-5a4df56a9c6eba36b56e9ffd042674b9255720ac.zip |
Usage strcpy instead of strncpy.submit/tizen_common/20141029.113059accepted/tizen/common/20141029.134507
Sometimes strncpy seems to have strange behavior
BUG=XWALK-2800
Change-Id: Idf11bb372e384fb23835b2a062a46d6ca0853ab1
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
-rwxr-xr-x | app_launcher.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app_launcher.c b/app_launcher.c index f59d1a42..45f40c71 100755 --- a/app_launcher.c +++ b/app_launcher.c @@ -250,7 +250,11 @@ int main(int argc, char **argv) case 's': case 'k': case 'r': - strncpy(args.applicationId, optarg, strlen(optarg)); + if(strlen(optarg) > 255) { + print_usage(argv[0]); + return -1; + } else + strcpy(args.applicationId, optarg); op = next_opt; break; |