summaryrefslogtreecommitdiff
path: root/app-forensics/zzuf/files/zzuf-0.15_use-after-free.patch
blob: 3de95d91608c27c199167aa823696071cc41ed89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/test/zzone.c
+++ b/test/zzone.c
@@ -64,14 +64,14 @@
             last++;
     }
 
-    free(buf);
-    free(tmp);
-
     size_t total = 0;
     for (size_t i = last; i < size; i++)
         total += countzeroes(buf[i]);
     printf("%li\n", (long)total);
 
+    free(buf);
+    free(tmp);
+
     return EXIT_SUCCESS;
 }