Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/postgresql-filedump-13.1/decode.c Examining data/postgresql-filedump-13.1/decode.h Examining data/postgresql-filedump-13.1/pg_filedump.c Examining data/postgresql-filedump-13.1/pg_filedump.h Examining data/postgresql-filedump-13.1/stringinfo.c FINAL RESULTS: data/postgresql-filedump-13.1/decode.c:323:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(__copy_format_buff, sizeof(__copy_format_buff), fmt, ##__VA_ARGS__); \ data/postgresql-filedump-13.1/decode.c:414:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(attrtypes, str); data/postgresql-filedump-13.1/decode.c:1053:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(toast_relation_filename, "%s/%d", toast_relation_path, data/postgresql-filedump-13.1/pg_filedump.c:796:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(optionBuffer, options[x]); data/postgresql-filedump-13.1/decode.c:201:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char decompress_tmp_buff[64 * 1024]; data/postgresql-filedump-13.1/decode.c:250:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmp_buff[64 * 1024]; data/postgresql-filedump-13.1/decode.c:322:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char __copy_format_buff[512]; \ data/postgresql-filedump-13.1/decode.c:403:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char attrtypes[ATTRTYPES_STR_MAX_LEN + 1]; data/postgresql-filedump-13.1/decode.c:718:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char uuid[16]; data/postgresql-filedump-13.1/decode.c:736:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char macaddr[6]; data/postgresql-filedump-13.1/decode.c:1032:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char toast_relation_filename[MAXPGPATH]; data/postgresql-filedump-13.1/decode.c:1056:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). toast_rel_fp = fopen(toast_relation_filename, "rb"); data/postgresql-filedump-13.1/decode.c:1147:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out_data, VARDATA(buffer), *out_length); data/postgresql-filedump-13.1/pg_filedump.c:207:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(&fileName[segnumOffset + 1]); data/postgresql-filedump-13.1/pg_filedump.c:427:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(optionString, "rb"); data/postgresql-filedump-13.1/pg_filedump.c:634:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value = atoi(optionString); data/postgresql-filedump-13.1/pg_filedump.c:647:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char localCache[sizeof(PageHeaderData)]; data/postgresql-filedump-13.1/pg_filedump.c:788:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char optionBuffer[52] = "\0"; data/postgresql-filedump-13.1/pg_filedump.c:834:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flagString[100]; data/postgresql-filedump-13.1/pg_filedump.c:856:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HAS_FREE_LINES|"); data/postgresql-filedump-13.1/pg_filedump.c:858:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "PAGE_FULL|"); data/postgresql-filedump-13.1/pg_filedump.c:860:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "ALL_VISIBLE|"); data/postgresql-filedump-13.1/pg_filedump.c:998:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char textFlags[16]; data/postgresql-filedump-13.1/pg_filedump.c:1044:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(textFlags, "UNUSED"); data/postgresql-filedump-13.1/pg_filedump.c:1047:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(textFlags, "NORMAL"); data/postgresql-filedump-13.1/pg_filedump.c:1050:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(textFlags, "REDIRECT"); data/postgresql-filedump-13.1/pg_filedump.c:1053:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(textFlags, "DEAD"); data/postgresql-filedump-13.1/pg_filedump.c:1057:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(textFlags, "0x%02x", itemFlags); data/postgresql-filedump-13.1/pg_filedump.c:1141:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const spgist_tupstates[4] = { data/postgresql-filedump-13.1/pg_filedump.c:1289:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flagString[256]; data/postgresql-filedump-13.1/pg_filedump.c:1332:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HASNULL|"); data/postgresql-filedump-13.1/pg_filedump.c:1334:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HASVARWIDTH|"); data/postgresql-filedump-13.1/pg_filedump.c:1336:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HASEXTERNAL|"); data/postgresql-filedump-13.1/pg_filedump.c:1339:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HASOID|"); data/postgresql-filedump-13.1/pg_filedump.c:1342:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_KEYSHR_LOCK|"); data/postgresql-filedump-13.1/pg_filedump.c:1344:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "COMBOCID|"); data/postgresql-filedump-13.1/pg_filedump.c:1346:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_EXCL_LOCK|"); data/postgresql-filedump-13.1/pg_filedump.c:1348:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_LOCK_ONLY|"); data/postgresql-filedump-13.1/pg_filedump.c:1350:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMIN_COMMITTED|"); data/postgresql-filedump-13.1/pg_filedump.c:1352:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMIN_INVALID|"); data/postgresql-filedump-13.1/pg_filedump.c:1354:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_COMMITTED|"); data/postgresql-filedump-13.1/pg_filedump.c:1356:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_INVALID|"); data/postgresql-filedump-13.1/pg_filedump.c:1358:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "XMAX_IS_MULTI|"); data/postgresql-filedump-13.1/pg_filedump.c:1360:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "UPDATED|"); data/postgresql-filedump-13.1/pg_filedump.c:1362:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "MOVED_OFF|"); data/postgresql-filedump-13.1/pg_filedump.c:1364:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "MOVED_IN|"); data/postgresql-filedump-13.1/pg_filedump.c:1367:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "KEYS_UPDATED|"); data/postgresql-filedump-13.1/pg_filedump.c:1369:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HOT_UPDATED|"); data/postgresql-filedump-13.1/pg_filedump.c:1371:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HEAP_ONLY|"); data/postgresql-filedump-13.1/pg_filedump.c:1427:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flagString[100] = "\0"; data/postgresql-filedump-13.1/pg_filedump.c:1452:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "LEAF|"); data/postgresql-filedump-13.1/pg_filedump.c:1454:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "ROOT|"); data/postgresql-filedump-13.1/pg_filedump.c:1456:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "DELETED|"); data/postgresql-filedump-13.1/pg_filedump.c:1458:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "META|"); data/postgresql-filedump-13.1/pg_filedump.c:1460:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HALFDEAD|"); data/postgresql-filedump-13.1/pg_filedump.c:1462:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "SPLITEND|"); data/postgresql-filedump-13.1/pg_filedump.c:1464:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "HASGARBAGE|"); data/postgresql-filedump-13.1/pg_filedump.c:1466:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "INCOMPLETESPLIT|"); data/postgresql-filedump-13.1/pg_filedump.c:1488:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "UNUSED|"); data/postgresql-filedump-13.1/pg_filedump.c:1490:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "OVERFLOW|"); data/postgresql-filedump-13.1/pg_filedump.c:1492:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "BUCKET|"); data/postgresql-filedump-13.1/pg_filedump.c:1494:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "BITMAP|"); data/postgresql-filedump-13.1/pg_filedump.c:1496:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "META|"); data/postgresql-filedump-13.1/pg_filedump.c:1515:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "LEAF|"); data/postgresql-filedump-13.1/pg_filedump.c:1517:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "DELETED|"); data/postgresql-filedump-13.1/pg_filedump.c:1519:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "TUPLES_DELETED|"); data/postgresql-filedump-13.1/pg_filedump.c:1521:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "FOLLOW_RIGHT|"); data/postgresql-filedump-13.1/pg_filedump.c:1540:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "DATA|"); data/postgresql-filedump-13.1/pg_filedump.c:1542:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "LEAF|"); data/postgresql-filedump-13.1/pg_filedump.c:1544:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "DELETED|"); data/postgresql-filedump-13.1/pg_filedump.c:1546:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "META|"); data/postgresql-filedump-13.1/pg_filedump.c:1548:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "LIST|"); data/postgresql-filedump-13.1/pg_filedump.c:1550:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "FULLROW|"); data/postgresql-filedump-13.1/pg_filedump.c:1552:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "INCOMPLETESPLIT|"); data/postgresql-filedump-13.1/pg_filedump.c:1554:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "COMPRESSED|"); data/postgresql-filedump-13.1/pg_filedump.c:1572:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "META|"); data/postgresql-filedump-13.1/pg_filedump.c:1574:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "DELETED|"); data/postgresql-filedump-13.1/pg_filedump.c:1576:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "LEAF|"); data/postgresql-filedump-13.1/pg_filedump.c:1578:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(flagString, "NULLS|"); data/postgresql-filedump-13.1/stringinfo.c:86:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->data + str->len, data, datalen); data/postgresql-filedump-13.1/decode.c:405:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/postgresql-filedump-13.1/pg_filedump.c:192:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int segnumOffset = strlen(fileName) - 1; data/postgresql-filedump-13.1/pg_filedump.c:226:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). optionStringLength = strlen(optionString); data/postgresql-filedump-13.1/pg_filedump.c:625:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int optionStringLength = strlen(optionString); data/postgresql-filedump-13.1/pg_filedump.c:794:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(optionBuffer) + strlen(options[x])) > 50) data/postgresql-filedump-13.1/pg_filedump.c:794:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(optionBuffer) + strlen(options[x])) > 50) data/postgresql-filedump-13.1/pg_filedump.c:798:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(optionBuffer, " "); data/postgresql-filedump-13.1/pg_filedump.c:808:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fileName, (strlen(optionBuffer)) ? optionBuffer : "None"); data/postgresql-filedump-13.1/pg_filedump.c:861:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:862:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1373:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1374:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1467:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1468:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1497:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1498:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1522:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1523:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1555:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1556:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/pg_filedump.c:1579:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(flagString)) data/postgresql-filedump-13.1/pg_filedump.c:1580:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). flagString[strlen(flagString) - 1] = '\0'; data/postgresql-filedump-13.1/stringinfo.c:68:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). appendBinaryStringInfo(str, s, strlen(s)); ANALYSIS SUMMARY: Hits = 103 Lines analyzed = 3632 in approximately 0.13 seconds (28719 lines/second) Physical Source Lines of Code (SLOC) = 2692 Hits@level = [0] 131 [1] 23 [2] 76 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 234 [1+] 103 [2+] 80 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 86.9242 [1+] 38.2615 [2+] 29.7177 [3+] 1.48588 [4+] 1.48588 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.