-
Notifications
You must be signed in to change notification settings - Fork 9
/
executable.sh
341 lines (272 loc) · 21.7 KB
/
executable.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#!/bin/bash
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy
k=1
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_cpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_cpy_67a.c CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_cpy_67b.c CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_strcpy/testcases.h
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy
for ((i = 1; i <= 45; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy_67a.c CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy_67b.c CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memcpy/testcases.h
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove
for ((i = 1; i <= 45; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove_67a.c CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove_67b.c CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove/testcases.h
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy
for ((i = 1; i <= 45; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memcpy/testcases.h
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove
for ((i = 1; i <= 45; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int_memmove/testcases.h
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat
cp CWE122_Heap_Based_Buffer_Overflow/includes/std_testcase_io.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat
cp CWE122_Heap_Based_Buffer_Overflow/includes/testcases.h CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_cat_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_cat_67a.c CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_cat_67b.c CWE122_Heap_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/std_testcase.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/std_testcase_io.h
rm CWE122_Heap_Based_Buffer_Overflow/CWE122_Heap_Based_Buffer_Overflow__c_dest_char_strcat/testcases.h
##################################################################################################################################
cp CWE415_Double_Free/includes/std_testcase.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_int
cp CWE415_Double_Free/includes/std_testcase_io.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_int
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE415_Double_Free/CWE415_Double_Free__malloc_free_int/CWE415_Double_Free__malloc_free_int_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE415_Double_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_int/std_testcase.h
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_int/std_testcase_io.h
cp CWE415_Double_Free/includes/std_testcase.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_long
cp CWE415_Double_Free/includes/std_testcase_io.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_long
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE415_Double_Free/CWE415_Double_Free__malloc_free_long/CWE415_Double_Free__malloc_free_long_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE415_Double_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_long/std_testcase.h
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_long/std_testcase_io.h
cp CWE415_Double_Free/includes/std_testcase.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_int64_t
cp CWE415_Double_Free/includes/std_testcase_io.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_int64_t
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE415_Double_Free/CWE415_Double_Free__malloc_free_int64_t/CWE415_Double_Free__malloc_free_int64_t_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE415_Double_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_int64_t/std_testcase.h
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_int64_t/std_testcase_io.h
cp CWE415_Double_Free/includes/std_testcase.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_struct
cp CWE415_Double_Free/includes/std_testcase_io.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_struct
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE415_Double_Free/CWE415_Double_Free__malloc_free_struct/CWE415_Double_Free__malloc_free_struct_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE415_Double_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_struct/std_testcase.h
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_struct/std_testcase_io.h
cp CWE415_Double_Free/includes/std_testcase.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_wchar_t
cp CWE415_Double_Free/includes/std_testcase_io.h CWE415_Double_Free/CWE415_Double_Free__malloc_free_wchar_t
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE415_Double_Free/CWE415_Double_Free__malloc_free_wchar_t/CWE415_Double_Free__malloc_free_wchar_t_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE415_Double_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_wchar_t/std_testcase.h
rm CWE415_Double_Free/CWE415_Double_Free__malloc_free_wchar_t/std_testcase_io.h
##################################################################################################################################
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cpy_67a.c CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cpy_67b.c CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/std_testcase_io.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcpy/testcases.h
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cat_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cat_67a.c CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_cat_67b.c CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/std_testcase_io.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__dest_char_declare_strcat/testcases.h
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy/std_testcase_io.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy/testcases.h
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove/std_testcase_io.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove/testcases.h
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_67a.c CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_67b.c CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/std_testcase_io.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy/testcases.h
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove
cp CWE121_Stack_Based_Buffer_Overflow/includes/std_testcase_io.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove
cp CWE121_Stack_Based_Buffer_Overflow/includes/testcases.h CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
fi
done
gcc CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_67a.c CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_67b.c CWE121_Stack_Based_Buffer_Overflow/includes/io.c -o $k
k=$((k+1))
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove/std_testcase.h
rm CWE121_Stack_Based_Buffer_Overflow/CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove/std_testcase_io.h
##################################################################################################################################
cp CWE416_Use_After_Free/includes/std_testcase.h CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_char
cp CWE416_Use_After_Free/includes/std_testcase_io.h CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_char
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_char/CWE416_Use_After_Free__malloc_free_char_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE416_Use_After_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_char/std_testcase.h
rm CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_char/std_testcase_io.h
cp CWE416_Use_After_Free/includes/std_testcase.h CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_long
cp CWE416_Use_After_Free/includes/std_testcase_io.h CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_long
for ((i = 1; i <= 44; i++ ));
do
FILE="CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_long/CWE416_Use_After_Free__malloc_free_long_$(printf "%02d" $i).c"
if [ -f $FILE ]; then
gcc $FILE CWE416_Use_After_Free/includes/io.c -o $k
k=$((k+1))
fi
done
rm CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_long/std_testcase.h
rm CWE416_Use_After_Free/CWE416_Use_After_Free__malloc_free_long/std_testcase_io.h