File size: 621 Bytes
7e7d487 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import os
import glob
base_dir = "C:\\Users\\MartyNattakit\\Desktop\\Datasets\\2022-08-11-juliet-c-cplusplus-v1-3-1-with-extra-support"
pattern = os.path.join(base_dir, "**", "CWE121_Stack_Based_Buffer_Overflow*.c")
files = {os.path.basename(f): f for f in glob.glob(pattern, recursive=True)}
print(f"Found {len(files)} .c files")
for file in [
"CWE121_Stack_Based_Buffer_Overflow__CWE805_wchar_t_declare_memcpy_32.c",
"CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_18.c",
"CWE121_Stack_Based_Buffer_Overflow__CWE135_01.c"
]:
print(f"{file}: {'Found' if file in files else 'Not found'}") |