Check the parameter.
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 16 Apr 2013 01:21:34 +0000 (10:21 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 16 Apr 2013 01:21:34 +0000 (10:21 +0900)
Even if it is checked before call the function,
We need to guarantees the argument from the receiver function.

Change-Id: I2ee2450072054870b96218918af842e91ed8750c

packaging/liblivebox-viewer.spec
src/util.c

index eea2090..878d0a6 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox-viewer
 Summary: Library for developing the application.
-Version: 0.12.4
+Version: 0.12.5
 Release: 1
 Group: HomeTF/Livebox
 License: Flora License
index b0e7181..03d679f 100644 (file)
@@ -145,6 +145,9 @@ int util_unlink(const char *filename)
        int desclen;
        int ret;
 
+       if (!filename)
+               return LB_STATUS_ERROR_INVALID;
+
        desclen = strlen(filename) + 6; /* .desc */
        descfile = malloc(desclen);
        if (!descfile) {