]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
src/rrd_utils.c: fix Coverity CID#13677 Sizeof not portable
authorMarek Schimara <Marek.Schimara@bull.net>
Fri, 17 Jun 2016 07:40:47 +0000 (09:40 +0200)
committerMarek Schimara <Marek.Schimara@bull.net>
Thu, 23 Jun 2016 14:32:33 +0000 (16:32 +0200)
        CWE-467 / https://cwe.mitre.org/data/definitions/467.html

src/rrd_utils.c

index 61d16bcc03dfecacf7a2e440de1e2317f68a56c7..27b6c3bbde8ead138f39a7f214cd9c10a77fecff 100644 (file)
@@ -75,7 +75,7 @@ int rrd_add_ptr_chunk(void ***dest, size_t *dest_size, void *src,
 
     if (*alloc == *dest_size)
     {
-        temp = (void **) rrd_realloc(*dest, (*alloc+chunk) * sizeof(*dest));
+        temp = (void **) rrd_realloc(*dest, (*alloc+chunk) * sizeof(**dest));
         if (!temp)
             return 0;