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/php-uploadprogress-1.1.3/uploadprogress-1.1.3/php_uploadprogress.h Examining data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c FINAL RESULTS: data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:115:13: [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(progress->upload_id, *e_data->value); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:124:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(progress->identifier_tmp, "%s.wr", progress->identifier); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:143:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(data_identifier, "%s-%s", progress->upload_id, progress->fieldname); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:411:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", template, identifier); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:413:9: [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(filename, template); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:414:9: [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(filename + (x - template), identifier); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:415:9: [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(filename, x + 2); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:540:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(data_identifier, "%s-%s", id, fieldname); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:426: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 s[1024]; data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:114:43: [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). progress->upload_id = emalloc(strlen(*e_data->value) + 1); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:123:48: [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). progress->identifier_tmp = emalloc(strlen( progress->identifier) + 4); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:142:39: [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). data_identifier = emalloc(strlen(progress->upload_id) + strlen(progress->fieldname) + 2); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:142:69: [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). data_identifier = emalloc(strlen(progress->upload_id) + strlen(progress->fieldname) + 2); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:407: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). filename = emalloc(strlen(template) + strlen(identifier) + 3); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:407:43: [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 = emalloc(strlen(template) + strlen(identifier) + 3); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:484:34: [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). for (index = strlen(v); index > 0; index--) { data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:539:35: [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). data_identifier = emalloc(strlen(id) + strlen(fieldname) + 2); data/php-uploadprogress-1.1.3/uploadprogress-1.1.3/uploadprogress.c:539:48: [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). data_identifier = emalloc(strlen(id) + strlen(fieldname) + 2); ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 721 in approximately 0.03 seconds (26203 lines/second) Physical Source Lines of Code (SLOC) = 505 Hits@level = [0] 1 [1] 9 [2] 1 [3] 0 [4] 8 [5] 0 Hits@level+ = [0+] 19 [1+] 18 [2+] 9 [3+] 8 [4+] 8 [5+] 0 Hits/KSLOC@level+ = [0+] 37.6238 [1+] 35.6436 [2+] 17.8218 [3+] 15.8416 [4+] 15.8416 [5+] 0 Dot directories skipped = 3 (--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.