]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
cuda: fix invalid use of sizeof
authorEric Leblond <eric@regit.org>
Sun, 24 Feb 2013 17:27:24 +0000 (18:27 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 26 Feb 2013 11:30:12 +0000 (12:30 +0100)
src/util-cuda-handlers.c

index f338426c6d587a7809dfe3e4de0d85b9414280e8..e500f40f852bb9e648deb89a29ce87f58e03d10b 100644 (file)
@@ -473,7 +473,7 @@ int SCCudaHlGetCudaModule(CUmodule *p_module, const char *ptx_image, int handle)
     if (unlikely(image == NULL)) {
         exit(EXIT_FAILURE);
     }
-    memset(image, 0x0, sizeof(image));
+    memset(image, 0x0, strlen(ptx_image)+15);
 
     int major = INT_MAX;
     int minor = INT_MAX;