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/libdvdread-6.1.1/src/dvd_reader.c Examining data/libdvdread-6.1.1/src/ifo_print.c Examining data/libdvdread-6.1.1/src/nav_print.c Examining data/libdvdread-6.1.1/src/logger.h Examining data/libdvdread-6.1.1/src/bitreader.c Examining data/libdvdread-6.1.1/src/bswap.h Examining data/libdvdread-6.1.1/src/nav_read.c Examining data/libdvdread-6.1.1/src/dvdread/ifo_read.h Examining data/libdvdread-6.1.1/src/dvdread/version.h Examining data/libdvdread-6.1.1/src/dvdread/nav_print.h Examining data/libdvdread-6.1.1/src/dvdread/ifo_types.h Examining data/libdvdread-6.1.1/src/dvdread/bitreader.h Examining data/libdvdread-6.1.1/src/dvdread/nav_types.h Examining data/libdvdread-6.1.1/src/dvdread/nav_read.h Examining data/libdvdread-6.1.1/src/dvdread/ifo_print.h Examining data/libdvdread-6.1.1/src/dvdread/dvd_reader.h Examining data/libdvdread-6.1.1/src/dvdread/dvd_udf.h Examining data/libdvdread-6.1.1/src/md5.h Examining data/libdvdread-6.1.1/src/ifo_read.c Examining data/libdvdread-6.1.1/src/md5.c Examining data/libdvdread-6.1.1/src/dvd_input.h Examining data/libdvdread-6.1.1/src/dvdread_internal.h Examining data/libdvdread-6.1.1/src/logger.c Examining data/libdvdread-6.1.1/src/dvd_input.c Examining data/libdvdread-6.1.1/src/dvd_udf.c Examining data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c Examining data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.h Examining data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.c Examining data/libdvdread-6.1.1/msvc/msvc/include/sys/time.h Examining data/libdvdread-6.1.1/msvc/msvc/include/unistd.h Examining data/libdvdread-6.1.1/msvc/msvc/include/os_types.h Examining data/libdvdread-6.1.1/msvc/msvc/include/dlfcn.h Examining data/libdvdread-6.1.1/msvc/msvc/include/inttypes.h Examining data/libdvdread-6.1.1/msvc/msvc/config.h FINAL RESULTS: data/libdvdread-6.1.1/msvc/msvc/include/unistd.h:67:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink data/libdvdread-6.1.1/src/dvd_udf.c:866:3: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(tokenline, filename, MAX_UDF_FILE_NAME_LEN - 1); data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.c:52:13: [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(strcpy(dir->name, name), all); data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.c:52:20: [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). strcat(strcpy(dir->name, name), all); data/libdvdread-6.1.1/msvc/msvc/include/os_types.h:15: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. #define snprintf _snprintf data/libdvdread-6.1.1/msvc/msvc/include/os_types.h:15:18: [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. #define snprintf _snprintf data/libdvdread-6.1.1/msvc/msvc/include/unistd.h:63: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. #define snprintf _snprintf data/libdvdread-6.1.1/msvc/msvc/include/unistd.h:63:18: [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. #define snprintf _snprintf data/libdvdread-6.1.1/msvc/msvc/include/unistd.h:64:9: [4] (format) vsnprintf: 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. #define vsnprintf _vsnprintf data/libdvdread-6.1.1/src/dvd_reader.c:293:3: [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( new_path, path ); data/libdvdread-6.1.1/src/dvd_reader.c:296: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( new_path, strstr( path, "/dsk/" ) + strlen( "/dsk/" ) ); data/libdvdread-6.1.1/src/dvd_reader.c:326: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( new_path, path + strlen( "/dev/" ) ); data/libdvdread-6.1.1/src/dvd_reader.c:735:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( filename, "%s%s%s", path, data/libdvdread-6.1.1/src/dvd_reader.c:763:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( video_path, "%s/VIDEO_TS/", dvd->rd->path_root ); data/libdvdread-6.1.1/src/dvd_reader.c:767:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( video_path, "%s/video_ts/", dvd->rd->path_root ); data/libdvdread-6.1.1/src/logger.c:37:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stream, fmt, list); data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c:38:12: [3] (misc) LoadLibraryEx: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. dsoh = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c:42:16: [3] (misc) LoadLibraryEx: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. dsoh = LoadLibraryEx(path, NULL, 0); data/libdvdread-6.1.1/src/dvd_reader.c:173:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *nokeys_str = getenv("DVDREAD_NOKEYS"); data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c:19: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 path[MAX_PATH], *p; data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c:52:12: [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 errstr[120]; data/libdvdread-6.1.1/src/dvd_input.c:197:13: [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). dev->fd = open(target, O_RDONLY); data/libdvdread-6.1.1/src/dvd_input.c:199:13: [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). dev->fd = open(target, O_RDONLY | O_BINARY); data/libdvdread-6.1.1/src/dvd_input.c:202: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 buf[256]; data/libdvdread-6.1.1/src/dvd_reader.c:169: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:184:7: [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( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); data/libdvdread-6.1.1/src/dvd_reader.c:186:7: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 ); data/libdvdread-6.1.1/src/dvd_reader.c:202:5: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 ); data/libdvdread-6.1.1/src/dvd_reader.c:295:3: [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( new_path, "/rdsk/" ); data/libdvdread-6.1.1/src/dvd_reader.c:325:3: [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( new_path, "/dev/r" ); data/libdvdread-6.1.1/src/dvd_reader.c:452:21: [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). if( ( cdir = open( ".", O_RDONLY ) ) >= 0 ) { data/libdvdread-6.1.1/src/dvd_reader.c:537:15: [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). mntfile = fopen( MNTTAB, "r" ); data/libdvdread-6.1.1/src/dvd_reader.c:556:15: [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). mntfile = fopen( _PATH_MOUNTED, "r" ); data/libdvdread-6.1.1/src/dvd_reader.c:561:7: [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 buf [8192]; data/libdvdread-6.1.1/src/dvd_reader.c:760: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 video_path[ PATH_MAX + 1 ]; data/libdvdread-6.1.1/src/dvd_reader.c:783: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 full_path[ PATH_MAX + 1 ]; data/libdvdread-6.1.1/src/dvd_reader.c:823: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:828:5: [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( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); data/libdvdread-6.1.1/src/dvd_reader.c:830:5: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); data/libdvdread-6.1.1/src/dvd_reader.c:847:7: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur ); data/libdvdread-6.1.1/src/dvd_reader.c:868: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:869: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 full_path[ PATH_MAX + 1 ]; data/libdvdread-6.1.1/src/dvd_reader.c:882:7: [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( filename, "VIDEO_TS.VOB" ); data/libdvdread-6.1.1/src/dvd_reader.c:884:7: [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( filename, "VTS_%02i_0.VOB", title ); data/libdvdread-6.1.1/src/dvd_reader.c:913:7: [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( filename, "VTS_%02i_%i.VOB", title, i + 1 ); data/libdvdread-6.1.1/src/dvd_reader.c:941: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:951:7: [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( filename, "/VIDEO_TS/VIDEO_TS.IFO" ); data/libdvdread-6.1.1/src/dvd_reader.c:953:7: [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( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum ); data/libdvdread-6.1.1/src/dvd_reader.c:959:7: [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( filename, "/VIDEO_TS/VIDEO_TS.BUP" ); data/libdvdread-6.1.1/src/dvd_reader.c:961:7: [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( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum ); data/libdvdread-6.1.1/src/dvd_reader.c:1015: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:1023:5: [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( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); data/libdvdread-6.1.1/src/dvd_reader.c:1025:5: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); data/libdvdread-6.1.1/src/dvd_reader.c:1038:7: [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( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur ); data/libdvdread-6.1.1/src/dvd_reader.c:1060: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:1061: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 full_path[ PATH_MAX + 1 ]; data/libdvdread-6.1.1/src/dvd_reader.c:1069:5: [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( filename, "VIDEO_TS.VOB" ); data/libdvdread-6.1.1/src/dvd_reader.c:1071:5: [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( filename, "VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); data/libdvdread-6.1.1/src/dvd_reader.c:1088:7: [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( filename, "VTS_%02d_%d.VOB", title, cur ); data/libdvdread-6.1.1/src/dvd_reader.c:1116: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_reader.c:1129:7: [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( filename, "/VIDEO_TS/VIDEO_TS.IFO" ); data/libdvdread-6.1.1/src/dvd_reader.c:1131:7: [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( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum ); data/libdvdread-6.1.1/src/dvd_reader.c:1136:7: [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( filename, "/VIDEO_TS/VIDEO_TS.BUP" ); data/libdvdread-6.1.1/src/dvd_reader.c:1138:7: [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( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum ); data/libdvdread-6.1.1/src/dvd_reader.c:1172: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 full_path[ PATH_MAX + 1 ]; data/libdvdread-6.1.1/src/dvd_reader.c:1230: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( data, dvd_file->cache + (off_t)offset * (off_t)DVD_VIDEO_LB_LEN, data/libdvdread-6.1.1/src/dvd_reader.c:1426: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( data, &(secbuf[ seek_byte ]), byte_size ); data/libdvdread-6.1.1/src/dvd_reader.c:1501: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( discid, ctx.buf, 16 ); data/libdvdread-6.1.1/src/dvd_reader.c:1556: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(volid, &buffer[40], volid_size-1); data/libdvdread-6.1.1/src/dvd_reader.c:1564: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(volsetid, &buffer[190], volsetid_size); data/libdvdread-6.1.1/src/dvd_udf.c:78: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 VolumeDesc[128]; data/libdvdread-6.1.1/src/dvd_udf.c:81: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 Contents[32]; data/libdvdread-6.1.1/src/dvd_udf.c:337:28: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define GETN(p, n, target) memcpy(target, &data[p], n) data/libdvdread-6.1.1/src/dvd_udf.c:546: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(File, &tmpmap.file, sizeof(tmpmap.file)); data/libdvdread-6.1.1/src/dvd_udf.c:585: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 filename[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_udf.c:651: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(FileICB, &tmpICB, sizeof(tmpICB)); data/libdvdread-6.1.1/src/dvd_udf.c:659: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(FileICB, &tmpICB, sizeof(tmpICB)); data/libdvdread-6.1.1/src/dvd_udf.c:860: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 tokenline[ MAX_UDF_FILE_NAME_LEN ]; data/libdvdread-6.1.1/src/dvd_udf.c:1009: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(pvd->VolumeIdentifier, &pvd_buf[24], 32); data/libdvdread-6.1.1/src/dvd_udf.c:1010: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(pvd->VolumeSetIdentifier, &pvd_buf[72], 128); data/libdvdread-6.1.1/src/dvd_udf.c:1064: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(volsetid, pvd.VolumeSetIdentifier, volsetid_size); data/libdvdread-6.1.1/src/dvdread/ifo_types.h:405: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 vmg_identifier[12]; data/libdvdread-6.1.1/src/dvdread/ifo_types.h:417: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 provider_identifier[32]; data/libdvdread-6.1.1/src/dvdread/ifo_types.h:572: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 text[12]; /* ended by 0x09 */ data/libdvdread-6.1.1/src/dvdread/ifo_types.h:592: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 disc_name[12]; data/libdvdread-6.1.1/src/dvdread/ifo_types.h:611: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 vts_identifier[12]; data/libdvdread-6.1.1/src/dvdread/nav_types.h:56: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 vobu_isrc[32]; data/libdvdread-6.1.1/src/ifo_read.c:57:9: [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(&alloc[i*2], "%02x", *((uint8_t*)&p_CZ[i])); data/libdvdread-6.1.1/src/ifo_read.c:123: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(buf, va, sizeof(video_attr_t)); data/libdvdread-6.1.1/src/ifo_read.c:142: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(buf, aa, sizeof(audio_attr_t)); data/libdvdread-6.1.1/src/ifo_read.c:167: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(buf, me, sizeof(multichannel_ext_t)); data/libdvdread-6.1.1/src/ifo_read.c:194: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(buf, sa, sizeof(subp_attr_t)); data/libdvdread-6.1.1/src/ifo_read.c:209: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(buf, uo, sizeof(user_ops_t)); data/libdvdread-6.1.1/src/ifo_read.c:243: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(buf, ps, sizeof(pgci_srp_t)); data/libdvdread-6.1.1/src/ifo_read.c:257: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(buf, cp, sizeof(cell_playback_t)); data/libdvdread-6.1.1/src/ifo_read.c:287: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(buf, pt, sizeof(playback_type_t)); data/libdvdread-6.1.1/src/ifo_read.c:313: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 ifo_filename[13]; data/libdvdread-6.1.1/src/ifo_read.c:1911: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(&pgcit->pgci_srp[i], ptr, PGCI_SRP_SIZE); data/libdvdread-6.1.1/src/ifo_read.c:2059: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(&pgci_ut->lu[i], ptr, PGCI_LU_SIZE); data/libdvdread-6.1.1/src/md5.c:102: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( correct_words, data, 64 ); data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.c:45:30: [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). size_t base_length = strlen(name); data/libdvdread-6.1.1/msvc/msvc/contrib/dirent/dirent.c:50:46: [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). (dir->name = malloc(base_length + strlen(all) + 1)) != 0) data/libdvdread-6.1.1/msvc/msvc/contrib/dlfcn.c:28:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(path, module_name, MAX_PATH); data/libdvdread-6.1.1/src/dvd_input.c:264:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(dev->fd, ((char*)buffer) + bytes, len); data/libdvdread-6.1.1/src/dvd_reader.c:291: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). new_path = malloc( strlen(path) + 2 ); data/libdvdread-6.1.1/src/dvd_reader.c:294:3: [1] (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 character. strcpy( strstr( new_path, "/dsk/" ), "" ); data/libdvdread-6.1.1/src/dvd_reader.c:296:47: [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). strcat( new_path, strstr( path, "/dsk/" ) + strlen( "/dsk/" ) ); data/libdvdread-6.1.1/src/dvd_reader.c:323: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). new_path = malloc( strlen(path) + 2 ); data/libdvdread-6.1.1/src/dvd_reader.c:326:28: [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). strcat( new_path, path + strlen( "/dev/" ) ); data/libdvdread-6.1.1/src/dvd_reader.c:379: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). len = strlen(path); data/libdvdread-6.1.1/src/dvd_reader.c:481: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( path_copy ) > 1 ) { data/libdvdread-6.1.1/src/dvd_reader.c:482: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). if( path_copy[ strlen( path_copy ) - 1 ] == '/' ) { data/libdvdread-6.1.1/src/dvd_reader.c:483: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). path_copy[ strlen( path_copy ) - 1 ] = '\0'; data/libdvdread-6.1.1/src/dvd_reader.c:488: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( path_copy ) > 9 ) { data/libdvdread-6.1.1/src/dvd_reader.c:489:37: [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( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]), data/libdvdread-6.1.1/src/dvd_reader.c:491: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). path_copy[ strlen( path_copy ) - (9-1) ] = '\0'; data/libdvdread-6.1.1/src/dvd_reader.c:494: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( path_copy ) > 9 ) { data/libdvdread-6.1.1/src/dvd_reader.c:495:37: [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( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]), data/libdvdread-6.1.1/src/dvd_reader.c:497: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). path_copy[ strlen( path_copy ) - 9 ] = '\0'; data/libdvdread-6.1.1/src/dvd_reader.c:736:26: [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). ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ), ANALYSIS SUMMARY: Hits = 120 Lines analyzed = 10343 in approximately 0.30 seconds (34922 lines/second) Physical Source Lines of Code (SLOC) = 7136 Hits@level = [0] 429 [1] 20 [2] 81 [3] 3 [4] 14 [5] 2 Hits@level+ = [0+] 549 [1+] 120 [2+] 100 [3+] 19 [4+] 16 [5+] 2 Hits/KSLOC@level+ = [0+] 76.9339 [1+] 16.8161 [2+] 14.0135 [3+] 2.66256 [4+] 2.24215 [5+] 0.280269 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.