fix bug that secure-stroage stored file name can be cut when requested file name...
authorjc815.lee <jc815.lee@samsung.com>
Tue, 28 May 2013 04:28:49 +0000 (13:28 +0900)
committerjc815.lee <jc815.lee@samsung.com>
Tue, 28 May 2013 07:09:06 +0000 (16:09 +0900)
[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>
server/src/ss_server_main.c

index b762e65..5d66f16 100755 (executable)
@@ -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);