diff options
author | jc815.lee <jc815.lee@samsung.com> | 2013-05-28 13:28:49 +0900 |
---|---|---|
committer | jc815.lee <jc815.lee@samsung.com> | 2013-05-28 16:09:06 +0900 |
commit | 864e54bab7840ec95608c38ebf8455a7111ff5fe (patch) | |
tree | 206e4d6e65efc4819738d47c62da8c3cfea5ead4 | |
parent | 5cdbe4eae9b8ee0ba031895378b4afc8ab4dd4df (diff) | |
download | secure-storage-864e54bab7840ec95608c38ebf8455a7111ff5fe.tar.gz secure-storage-864e54bab7840ec95608c38ebf8455a7111ff5fe.tar.bz2 secure-storage-864e54bab7840ec95608c38ebf8455a7111ff5fe.zip |
fix bug that secure-stroage stored file name can be cut when requested file name has '/'
[model] GT-I8800
[binary_type] platform
[customer] OPEN
[issue#] N/A
[problem] file name can be concatenated
[cause] Didn't calculate length of file name
[solution] Add length of file name to destination path
[team] Framework
[request] N/A
[horizontal_expansion]
Change-Id: I5238818084048adaadd4f8d076cee752d1da6d51
Signed-off-by: jc815.lee <jc815.lee@samsung.com>
-rwxr-xr-x | server/src/ss_server_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/ss_server_main.c b/server/src/ss_server_main.c index b762e65..5d66f16 100755 --- a/server/src/ss_server_main.c +++ b/server/src/ss_server_main.c @@ -348,7 +348,8 @@ int ConvertFileName(int sender_pid, char* dest, const char* src, ssm_flag flag, int length_of_file = 0; if(if_pointer != NULL) { - strncat(dest, if_pointer + 1, strlen(if_pointer) + 1); + length_of_file = strlen(if_pointer); + strncat(dest, if_pointer + 1, length_of_file + 1); } strncat(dest, "_", 1); |