Fix wrong use of pointer-to-array as an array, CID #1434191.
authorwwp <wwp@free.fr>
Wed, 11 Apr 2018 06:57:32 +0000 (08:57 +0200)
committerwwp <wwp@free.fr>
Wed, 11 Apr 2018 06:57:32 +0000 (08:57 +0200)
src/plugins/clamd/libclamd/clamd-plugin.c

index d88b131..963cbca 100644 (file)
@@ -499,7 +499,7 @@ static Clamd_Stat clamd_stream_scan(int sock,
                *res = g_strconcat("ERROR -> ", _("Socket read error"), NULL);
                return SCAN_ERROR;
        }
-       res[n_read] = '\0';
+       (*res)[n_read] = '\0';
        debug_print("received: %s\n", *res);
        return OK;
 }