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/pandas-1.1.4+dfsg/pandas/_libs/src/headers/ms_inttypes.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/headers/ms_stdint.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/headers/portable.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/headers/stdint.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/inline_helper.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/klib/khash.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/klib/khash_python.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/parse_helper.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/skiplist.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajson.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsondec.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/JSONtoObj.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/date_conversions.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/date_conversions.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/ujson.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/version.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime.h Examining data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c Examining data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.h FINAL RESULTS: data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.c:604:9: [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(self->error_msg, bufsize, \ data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.h:47:18: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define TRACE(X) printf X; data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:828:24: [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. enc->offset += snprintf(str, enc->end - enc->offset, precision_str, data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1399:21: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(cLabel, "%" NPY_DATETIME_FMT, data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:630:14: [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. tmplen = _snprintf(substr, sublen, "%04" NPY_INT64_FMT, dts->year); data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:632:14: [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. tmplen = snprintf(substr, sublen, "%04" NPY_INT64_FMT, dts->year); data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:913:14: [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. *outlen += snprintf(outstr, 60, // NOLINT data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:922:16: [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. *outlen += snprintf(outstr, 12, // NOLINT data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:928:16: [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. *outlen += snprintf(outstr, 9, // NOLINT data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:933:16: [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. *outlen += snprintf(outstr, 6, // NOLINT data/pandas-1.1.4+dfsg/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c:936:16: [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. *outlen += snprintf(outstr, 2, // NOLINT data/pandas-1.1.4+dfsg/pandas/_libs/src/klib/khash_python.h:19: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(&val, &key, sizeof(double)); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c:42:24: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int required = MultiByteToWideChar(CP_UTF8, 0, fname, -1, NULL, 0); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c:54:13: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8, 0, fname, -1, wname, required) < data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c:65:14: [2] (misc) open: 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). fs->fd = open(fname, O_RDONLY | O_BINARY); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c:235:14: [2] (misc) open: 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). mm->fd = open(fname, O_RDONLY | O_BINARY); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsondec.c:718:13: [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(ds->escStart, oldStart, escLen * sizeof(wchar_t)); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsondec.c:1159:5: [2] (buffer) wchar_t: 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. wchar_t escBuffer[(JSON_MAX_STACK_BUFFER_SIZE / sizeof(wchar_t))]; data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:390:9: [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(enc->start, oldStart, offset); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:553:17: [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(&in16, io, sizeof(JSUTF16)); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:587:17: [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(&in16, io, sizeof(JSUTF16)); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:588:17: [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(&in8, io + 2, sizeof(JSUINT8)); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:623:17: [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(&in, io, sizeof(JSUTF32)); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/lib/ultrajsonenc.c:785:5: [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 precision_str[20]; data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1076:9: [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(GET_TC(tc)->cStr, "name", sizeof(char) * 5); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1079:9: [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(GET_TC(tc)->cStr, "data", sizeof(char) * 5); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1126:9: [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(GET_TC(tc)->cStr, "name", sizeof(char) * 5); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1129:9: [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(GET_TC(tc)->cStr, "index", sizeof(char) * 6); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1132:9: [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(GET_TC(tc)->cStr, "data", sizeof(char) * 5); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1182:9: [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(GET_TC(tc)->cStr, "columns", sizeof(char) * 8); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1185:9: [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(GET_TC(tc)->cStr, "index", sizeof(char) * 6); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1188:9: [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(GET_TC(tc)->cStr, "data", sizeof(char) * 5); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1419:9: [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(ret[i], cLabel, len + 1); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1994:5: [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(bytes, str, *_outLen + 1); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:2037:5: [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 buffer[65536]; data/pandas-1.1.4+dfsg/pandas/_libs/src/parse_helper.h:50:13: [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(data) == 3) { data/pandas-1.1.4+dfsg/pandas/_libs/src/parse_helper.h:57:20: [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). } else if (strlen(data) == 4) { data/pandas-1.1.4+dfsg/pandas/_libs/src/parse_helper.h:67:20: [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). } else if (strlen(data) == 8) { data/pandas-1.1.4+dfsg/pandas/_libs/src/parse_helper.h:74:20: [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). } else if (strlen(data) == 9) { data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/io.c:145:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = read(fs->fd, fs->buffer, nbytes); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.c:397:22: [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). int64_t length = strlen(msg); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.c:404:21: [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). ex_length = strlen(self->warn_msg); data/pandas-1.1.4+dfsg/pandas/_libs/src/parser/tokenizer.c:1194: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). strlen(self->words[word_deletions - 1]) + 1); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/date_conversions.c:60:12: [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(result); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/date_conversions.c:97:12: [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(result); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:545: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). *outLen = strlen(cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:601: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). *outLen = strlen(cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:620: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). *outLen = strlen(cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1100: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). *outLen = strlen(GET_TC(tc)->cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1156: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). *outLen = strlen(GET_TC(tc)->cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1217: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). *outLen = strlen(GET_TC(tc)->cStr); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1379:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(cLabel, "null", len + 1); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1401:27: [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(cLabel); data/pandas-1.1.4+dfsg/pandas/_libs/src/ujson/python/objToJSON.c:1414:19: [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(cLabel); ANALYSIS SUMMARY: Hits = 54 Lines analyzed = 11971 in approximately 0.50 seconds (23800 lines/second) Physical Source Lines of Code (SLOC) = 8592 Hits@level = [0] 15 [1] 19 [2] 24 [3] 0 [4] 11 [5] 0 Hits@level+ = [0+] 69 [1+] 54 [2+] 35 [3+] 11 [4+] 11 [5+] 0 Hits/KSLOC@level+ = [0+] 8.03073 [1+] 6.28492 [2+] 4.07356 [3+] 1.28026 [4+] 1.28026 [5+] 0 Dot directories skipped = 2 (--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.