Resolve the prevent.
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 13 Aug 2013 02:00:31 +0000 (11:00 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 13 Aug 2013 02:00:31 +0000 (11:00 +0900)
[model] Redwood
[binary_type] AP
[customer] Docomo/Orange/Open
[issue#] CID 30119
[problem] malloc
[cause] size is small
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Idd2175398e32982a0a67cae6f0ac2e7979679d98

src/file_service.c

index da8f52c..c72dc9c 100644 (file)
@@ -164,7 +164,7 @@ static inline int file_service_open(void)
        int len;
        int fd;
 
-       addr = malloc(strlen(client_addr()));
+       addr = malloc(strlen(client_addr()) + 1);
        if (!addr) {
                ErrPrint("Heap: %s\n", strerror(errno));
                return -ENOMEM;