Check parameter for NULL before derefering 37/190237/1
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Fri, 28 Sep 2018 10:09:46 +0000 (15:39 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Fri, 28 Sep 2018 10:10:21 +0000 (15:40 +0530)
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: Iff4ae6b79777f4965cb018995d4106c0a8e766c5

src/network-cm-intf.c

index 4b75ac6..3c8d44b 100755 (executable)
@@ -1638,6 +1638,11 @@ EXPORT_API gboolean net_get_tcpdump_state(gboolean *is_tcpdump_running)
 {
        __NETWORK_FUNC_ENTER__;
 
+       if (is_tcpdump_running == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_INVALID_PARAM;
+       }
+
        net_err_t Error = NET_ERR_NONE;
        GVariant *message = NULL;
        const char *method = "GetTCPDumpState";