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/xdffileio-0.3/tests/validation.h Examining data/xdffileio-0.3/tests/testgdf1.c Examining data/xdffileio-0.3/tests/copy_xdf.h Examining data/xdffileio-0.3/tests/testedf.c Examining data/xdffileio-0.3/tests/filecmp.c Examining data/xdffileio-0.3/tests/copy_xdf.c Examining data/xdffileio-0.3/tests/readcheck.c Examining data/xdffileio-0.3/tests/testgdf2.c Examining data/xdffileio-0.3/tests/testbdf.c Examining data/xdffileio-0.3/tests/filecmp.h Examining data/xdffileio-0.3/tests/validation.c Examining data/xdffileio-0.3/tests/errorcheck.c Examining data/xdffileio-0.3/src/streamops.h Examining data/xdffileio-0.3/src/xdfevent.c Examining data/xdffileio-0.3/src/gdf2.h Examining data/xdffileio-0.3/src/formatdecl.c Examining data/xdffileio-0.3/src/xdfevent.h Examining data/xdffileio-0.3/src/streamops.c Examining data/xdffileio-0.3/src/xdfconfig.c Examining data/xdffileio-0.3/src/xdfio.h Examining data/xdffileio-0.3/src/gdf1.c Examining data/xdffileio-0.3/src/xdffile.h Examining data/xdffileio-0.3/src/gdf1.h Examining data/xdffileio-0.3/src/ebdffile.c Examining data/xdffileio-0.3/src/xdftypes.c Examining data/xdffileio-0.3/src/xdffile.c Examining data/xdffileio-0.3/src/gdf2.c Examining data/xdffileio-0.3/src/ebdf.h Examining data/xdffileio-0.3/src/xdftypes.h Examining data/xdffileio-0.3/doc/example/create_bdf.c Examining data/xdffileio-0.3/doc/example/copy_datafile.c Examining data/xdffileio-0.3/build-aux/snippet/warn-on-use.h Examining data/xdffileio-0.3/build-aux/snippet/c++defs.h Examining data/xdffileio-0.3/build-aux/snippet/arg-nonnull.h Examining data/xdffileio-0.3/lib/fsync.c Examining data/xdffileio-0.3/lib/dummy.c Examining data/xdffileio-0.3/lib/stddef.in.h Examining data/xdffileio-0.3/lib/msvc-inval.c Examining data/xdffileio-0.3/lib/msvc-nothrow.h Examining data/xdffileio-0.3/lib/msvc-inval.h Examining data/xdffileio-0.3/lib/byteswap.in.h Examining data/xdffileio-0.3/lib/binary-io.h Examining data/xdffileio-0.3/lib/fcntl.in.h Examining data/xdffileio-0.3/lib/unistd.in.h Examining data/xdffileio-0.3/lib/msvc-nothrow.c FINAL RESULTS: data/xdffileio-0.3/lib/unistd.in.h:248:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " data/xdffileio-0.3/lib/unistd.in.h:262:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/xdffileio-0.3/lib/unistd.in.h:263:12: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # define chown rpl_chown data/xdffileio-0.3/lib/unistd.in.h:265:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) data/xdffileio-0.3/lib/unistd.in.h:267:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); data/xdffileio-0.3/lib/unistd.in.h:270:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) data/xdffileio-0.3/lib/unistd.in.h:273:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); data/xdffileio-0.3/lib/unistd.in.h:275:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIASWARN (chown); data/xdffileio-0.3/lib/unistd.in.h:277:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/xdffileio-0.3/lib/unistd.in.h:279:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " data/xdffileio-0.3/lib/unistd.in.h:1233:12: [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 rpl_readlink data/xdffileio-0.3/lib/unistd.in.h:1235:19: [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. _GL_FUNCDECL_RPL (readlink, ssize_t, data/xdffileio-0.3/lib/unistd.in.h:1238:19: [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. _GL_CXXALIAS_RPL (readlink, ssize_t, data/xdffileio-0.3/lib/unistd.in.h:1242:19: [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. _GL_FUNCDECL_SYS (readlink, ssize_t, data/xdffileio-0.3/lib/unistd.in.h:1246:19: [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. _GL_CXXALIAS_SYS (readlink, ssize_t, data/xdffileio-0.3/lib/unistd.in.h:1249:19: [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. _GL_CXXALIASWARN (readlink); data/xdffileio-0.3/lib/unistd.in.h:1251: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. # undef readlink data/xdffileio-0.3/lib/unistd.in.h:1253:18: [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. _GL_WARN_ON_USE (readlink, "readlink is unportable - " data/xdffileio-0.3/lib/unistd.in.h:237:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. _GL_WARN_ON_USE (access, "the access function is a security risk - " data/xdffileio-0.3/lib/unistd.in.h:744:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_FUNCDECL_SYS (getlogin, char *, (void)); data/xdffileio-0.3/lib/unistd.in.h:746:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIAS_SYS (getlogin, char *, (void)); data/xdffileio-0.3/lib/unistd.in.h:747:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIASWARN (getlogin); data/xdffileio-0.3/lib/unistd.in.h:749:9: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. # undef getlogin data/xdffileio-0.3/lib/unistd.in.h:751:18: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " data/xdffileio-0.3/src/streamops.c:193:7: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if ((fscanf(file, format, val) <= 0) data/xdffileio-0.3/src/xdfevent.c:69:4: [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(elabel, label); data/xdffileio-0.3/tests/readcheck.c:199:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(reffilename, "%s/%s", getenv("srcdir"), FILENAME); data/xdffileio-0.3/doc/example/copy_datafile.c:205:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((opt = getopt(argc, argv, "t:h")) != -1) { data/xdffileio-0.3/tests/errorcheck.c:143:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "k")) != -1) { data/xdffileio-0.3/tests/errorcheck.c:161:4: [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. getenv("srcdir"),basename); data/xdffileio-0.3/tests/readcheck.c:199:32: [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. sprintf(reffilename, "%s/%s", getenv("srcdir"), FILENAME); data/xdffileio-0.3/tests/testbdf.c:246:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "kc:")) != -1) { data/xdffileio-0.3/tests/testbdf.c:267:38: [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. "%s/ref%u-%u-%u-%u-%u-%u-%u.bdf", getenv("srcdir"),SAMPLINGRATE, DURATION, data/xdffileio-0.3/tests/testedf.c:245:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "kc:")) != -1) { data/xdffileio-0.3/tests/testedf.c:266:38: [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. "%s/ref%u-%u-%u-%u-%u-%u-%u.edf", getenv("srcdir"),SAMPLINGRATE, DURATION, data/xdffileio-0.3/tests/testgdf1.c:261:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "kc:")) != -1) { data/xdffileio-0.3/tests/testgdf1.c:282:39: [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. "%s/ref%u-%u-%u-%u-%u-%u-%u.gdf1", getenv("srcdir"),SAMPLINGRATE, DURATION, data/xdffileio-0.3/tests/testgdf2.c:271:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "kc:")) != -1) { data/xdffileio-0.3/tests/testgdf2.c:292:39: [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. "%s/ref%u-%u-%u-%u-%u-%u-%u.gdf2", getenv("srcdir"),SAMPLINGRATE, DURATION, data/xdffileio-0.3/doc/example/copy_datafile.c:38: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. const char filetype_args[XDF_NUM_FILE_TYPES][8] = { data/xdffileio-0.3/doc/example/create_bdf.c:54: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. const char eeglabels[64][8] = { data/xdffileio-0.3/doc/example/create_bdf.c:65: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. const char senslabels[8][8] = { data/xdffileio-0.3/lib/fcntl.in.h:107:11: [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). # undef open data/xdffileio-0.3/lib/fcntl.in.h:108:12: [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). # define open rpl_open data/xdffileio-0.3/lib/fcntl.in.h:110:19: [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). _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) data/xdffileio-0.3/lib/fcntl.in.h:112:19: [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). _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); data/xdffileio-0.3/lib/fcntl.in.h:114:19: [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). _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); data/xdffileio-0.3/lib/fcntl.in.h:119:19: [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). _GL_CXXALIASWARN (open); data/xdffileio-0.3/lib/fcntl.in.h:122:9: [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). # undef open data/xdffileio-0.3/lib/fcntl.in.h:124:18: [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). _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " data/xdffileio-0.3/src/ebdffile.c:56: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 label[17]; data/xdffileio-0.3/src/ebdffile.c:57: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 transducter[81]; data/xdffileio-0.3/src/ebdffile.c:58: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 unit[9]; data/xdffileio-0.3/src/ebdffile.c:59: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 prefiltering[81]; data/xdffileio-0.3/src/ebdffile.c:60: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 reserved[33]; data/xdffileio-0.3/src/ebdffile.c:67: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 subjstr[81]; data/xdffileio-0.3/src/ebdffile.c:68: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 recstr[81]; data/xdffileio-0.3/src/ebdffile.c:180: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(&(ebdf->default_ebdfch), defch, sizeof(*defch)); data/xdffileio-0.3/src/ebdffile.c:363: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 timestring[17]; data/xdffileio-0.3/src/ebdffile.c:488: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 timestring[17], type[45]; data/xdffileio-0.3/src/ebdffile.c:629: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 numrecstr[9]; data/xdffileio-0.3/src/gdf1.c:61: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 label[17]; data/xdffileio-0.3/src/gdf1.c:62: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 transducter[81]; data/xdffileio-0.3/src/gdf1.c:63: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 unit[9]; data/xdffileio-0.3/src/gdf1.c:64: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 prefiltering[81]; data/xdffileio-0.3/src/gdf1.c:65: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 reserved[33]; data/xdffileio-0.3/src/gdf1.c:72: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 subjstr[81]; data/xdffileio-0.3/src/gdf1.c:73: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 recstr[81]; data/xdffileio-0.3/src/gdf1.c:76: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 sn[21]; data/xdffileio-0.3/src/gdf1.c:193: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(&(gdf1->default_gdf1ch), &gdf1ch_def, sizeof(gdf1ch_def)); data/xdffileio-0.3/src/gdf1.c:210: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 key[9] = {0}; data/xdffileio-0.3/src/gdf1.c:368: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 timestring[17]; data/xdffileio-0.3/src/gdf1.c:372: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 key[9]; data/xdffileio-0.3/src/gdf1.c:587: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 timestring[17]; data/xdffileio-0.3/src/gdf1.c:773: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 desc[32]; data/xdffileio-0.3/src/gdf1.c:781:4: [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(desc, "ch:all"); data/xdffileio-0.3/src/gdf2.c:60: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 label[17]; data/xdffileio-0.3/src/gdf2.c:61: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 transducter[81]; data/xdffileio-0.3/src/gdf2.c:62: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 unit[7]; data/xdffileio-0.3/src/gdf2.c:64: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 filtering[69]; data/xdffileio-0.3/src/gdf2.c:68: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 reserved[20]; data/xdffileio-0.3/src/gdf2.c:75: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 subjstr[67]; data/xdffileio-0.3/src/gdf2.c:80: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 recstr[65]; data/xdffileio-0.3/src/gdf2.c:242: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(&(gdf2->default_gdf2ch), &gdf2ch_def, sizeof(gdf2ch_def)); data/xdffileio-0.3/src/gdf2.c:259: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 key[9] = {0}; data/xdffileio-0.3/src/gdf2.c:445: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->icd, gdf2->pclass, sizeof(gdf2->pclass)); data/xdffileio-0.3/src/gdf2.c:484: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 key[9]; data/xdffileio-0.3/src/gdf2.c:927: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 desc[32]; data/xdffileio-0.3/src/gdf2.c:935:4: [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(desc, "ch:all"); data/xdffileio-0.3/src/streamops.c:189: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 format[8]; data/xdffileio-0.3/src/xdfconfig.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(va_arg(*ap, double*), val.pos, sizeof(val.pos)); data/xdffileio-0.3/src/xdfconfig.c:144: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(va_arg(*ap, char*), val.icd, sizeof(val.icd)); data/xdffileio-0.3/src/xdfconfig.c:208:8: [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). fd = open(filename, flags, mode); data/xdffileio-0.3/src/xdfconfig.c:210:8: [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). fd = open(filename, flags); data/xdffileio-0.3/src/xdfconfig.c:262: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 magickey[8]; data/xdffileio-0.3/src/xdfconfig.c:386: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(data, (char*)xdf->defaultch - ops->choff, ops->chlen); data/xdffileio-0.3/src/xdfconfig.c:697: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(((char*)dst) - ops->choff, data/xdffileio-0.3/src/xdfevent.c:111: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(batch->evt + index, evt, sizeof(*evt)); data/xdffileio-0.3/src/xdffile.c:707: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(xdf->array_stride, strides, numarrays*sizeof(*(xdf->array_stride))); data/xdffileio-0.3/src/xdffile.c:804:4: [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(buff+batch[k].foff, in[ia], batch[k].len); data/xdffileio-0.3/src/xdffile.c:859:4: [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[ia], buff+batch[k].foff, batch[k].len); data/xdffileio-0.3/src/xdffile.h:44: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 icd[6]; data/xdffileio-0.3/tests/errorcheck.c:140: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 reffilename[128]; data/xdffileio-0.3/tests/filecmp.c:34:12: [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). reffile = fopen(reffilename,"rb"); data/xdffileio-0.3/tests/filecmp.c:35:13: [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). testfile = fopen(testfilename,"rb"); data/xdffileio-0.3/tests/readcheck.c:198: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 reffilename[512]; data/xdffileio-0.3/tests/testbdf.c:149: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 tmpstr[16]; data/xdffileio-0.3/tests/testbdf.c:179:3: [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(tmpstr, "EEG%i", j); data/xdffileio-0.3/tests/testbdf.c:187:3: [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(tmpstr, "EXG%i", j); data/xdffileio-0.3/tests/testbdf.c:195:3: [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(tmpstr, "TRI1%i", j); data/xdffileio-0.3/tests/testbdf.c:203:3: [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(tmpstr, "TRI2%i", j); data/xdffileio-0.3/tests/testbdf.c:244: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 reffilename[128]; data/xdffileio-0.3/tests/testbdf.c:252:15: [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). testcopy = atoi(optarg); data/xdffileio-0.3/tests/testedf.c:148: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 tmpstr[16]; data/xdffileio-0.3/tests/testedf.c:178:3: [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(tmpstr, "EEG%i", j); data/xdffileio-0.3/tests/testedf.c:186:3: [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(tmpstr, "EXG%i", j); data/xdffileio-0.3/tests/testedf.c:194:3: [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(tmpstr, "TRI1%i", j); data/xdffileio-0.3/tests/testedf.c:202:3: [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(tmpstr, "TRI2%i", j); data/xdffileio-0.3/tests/testedf.c:243: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 reffilename[128]; data/xdffileio-0.3/tests/testedf.c:251:15: [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). testcopy = atoi(optarg); data/xdffileio-0.3/tests/testgdf1.c:155: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 tmpstr[16]; data/xdffileio-0.3/tests/testgdf1.c:185:3: [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(tmpstr, "EEG%i", j); data/xdffileio-0.3/tests/testgdf1.c:193:3: [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(tmpstr, "EXG%i", j); data/xdffileio-0.3/tests/testgdf1.c:201:3: [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(tmpstr, "TRI1%i", j); data/xdffileio-0.3/tests/testgdf1.c:209:3: [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(tmpstr, "TRI2%i", j); data/xdffileio-0.3/tests/testgdf1.c:259: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 reffilename[128]; data/xdffileio-0.3/tests/testgdf1.c:267:15: [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). testcopy = atoi(optarg); data/xdffileio-0.3/tests/testgdf2.c:158: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 tmpstr[16]; data/xdffileio-0.3/tests/testgdf2.c:195:3: [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(tmpstr, "EEG%i", j); data/xdffileio-0.3/tests/testgdf2.c:203:3: [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(tmpstr, "EXG%i", j); data/xdffileio-0.3/tests/testgdf2.c:211:3: [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(tmpstr, "TRI1%i", j); data/xdffileio-0.3/tests/testgdf2.c:219:3: [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(tmpstr, "TRI2%i", j); data/xdffileio-0.3/tests/testgdf2.c:269: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 reffilename[128]; data/xdffileio-0.3/tests/testgdf2.c:277:15: [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). testcopy = atoi(optarg); data/xdffileio-0.3/lib/unistd.in.h:1209:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef read data/xdffileio-0.3/lib/unistd.in.h:1210:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read rpl_read data/xdffileio-0.3/lib/unistd.in.h:1212:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) data/xdffileio-0.3/lib/unistd.in.h:1214:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); data/xdffileio-0.3/lib/unistd.in.h:1219:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); data/xdffileio-0.3/lib/unistd.in.h:1221:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (read); data/xdffileio-0.3/lib/unistd.in.h:1481:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/xdffileio-0.3/lib/unistd.in.h:1482:12: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # define usleep rpl_usleep data/xdffileio-0.3/lib/unistd.in.h:1484:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); data/xdffileio-0.3/lib/unistd.in.h:1485:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); data/xdffileio-0.3/lib/unistd.in.h:1488:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); data/xdffileio-0.3/lib/unistd.in.h:1490:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); data/xdffileio-0.3/lib/unistd.in.h:1492:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIASWARN (usleep); data/xdffileio-0.3/lib/unistd.in.h:1494:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/xdffileio-0.3/lib/unistd.in.h:1496:18: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_WARN_ON_USE (usleep, "usleep is unportable - " data/xdffileio-0.3/src/ebdffile.c:248:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdfch->label, val.str, sizeof(ebdfch->label)-1); data/xdffileio-0.3/src/ebdffile.c:250:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdfch->unit, val.str, sizeof(ebdfch->unit)-1); data/xdffileio-0.3/src/ebdffile.c:252:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdfch->transducter, val.str, sizeof(ebdfch->transducter)-1); data/xdffileio-0.3/src/ebdffile.c:254:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdfch->prefiltering, val.str, sizeof(ebdfch->prefiltering)-1); data/xdffileio-0.3/src/ebdffile.c:256:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdfch->reserved, val.str, sizeof(ebdfch->reserved)-1); data/xdffileio-0.3/src/ebdffile.c:314:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdf->subjstr, val.str, sizeof(ebdf->subjstr)-1); data/xdffileio-0.3/src/ebdffile.c:316:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ebdf->recstr, val.str, sizeof(ebdf->recstr)-1); data/xdffileio-0.3/src/gdf1.c:213:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(key, (const char*)magickey, 8); data/xdffileio-0.3/src/gdf1.c:241:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1ch->label, val.str, sizeof(gdf1ch->label)-1); data/xdffileio-0.3/src/gdf1.c:243:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1ch->unit, val.str, sizeof(gdf1ch->unit)-1); data/xdffileio-0.3/src/gdf1.c:245:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1ch->transducter, val.str, sizeof(gdf1ch->transducter)-1); data/xdffileio-0.3/src/gdf1.c:247:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1ch->prefiltering, val.str, sizeof(gdf1ch->prefiltering)-1); data/xdffileio-0.3/src/gdf1.c:249:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1ch->reserved, val.str, sizeof(gdf1ch->reserved)-1); data/xdffileio-0.3/src/gdf1.c:307:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1->subjstr, val.str, sizeof(gdf1->subjstr)-1); data/xdffileio-0.3/src/gdf1.c:309:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf1->recstr, val.str, sizeof(gdf1->recstr)-1); data/xdffileio-0.3/src/gdf2.c:262:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(key, (const char*)magickey, 8); data/xdffileio-0.3/src/gdf2.c:290:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2ch->label, val.str, sizeof(gdf2ch->label)-1); data/xdffileio-0.3/src/gdf2.c:292:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2ch->unit, val.str, sizeof(gdf2ch->unit)-1); data/xdffileio-0.3/src/gdf2.c:294:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2ch->transducter, val.str, sizeof(gdf2ch->transducter)-1); data/xdffileio-0.3/src/gdf2.c:296:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2ch->filtering, val.str, sizeof(gdf2ch->filtering)-1); data/xdffileio-0.3/src/gdf2.c:298:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2ch->reserved, val.str, sizeof(gdf2ch->reserved)-1); data/xdffileio-0.3/src/gdf2.c:363:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2->subjstr, val.str, sizeof(gdf2->subjstr)-1); data/xdffileio-0.3/src/gdf2.c:365:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gdf2->recstr, val.str, sizeof(gdf2->recstr)-1); data/xdffileio-0.3/src/streamops.c:214: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). pos = strlen(val); data/xdffileio-0.3/src/xdfconfig.c:272:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( (read(fd, magickey, sizeof(magickey)) == -1) data/xdffileio-0.3/src/xdfconfig.c:992:10: [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). *desc = strlen(entry->label) ? entry->label : NULL; data/xdffileio-0.3/src/xdfevent.c:66: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). elabel = malloc(strlen(label)+1); data/xdffileio-0.3/src/xdffile.c:187:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rsize = read(xdf->fd, fbuff, reqsize); ANALYSIS SUMMARY: Hits = 177 Lines analyzed = 11643 in approximately 0.32 seconds (36641 lines/second) Physical Source Lines of Code (SLOC) = 7729 Hits@level = [0] 101 [1] 43 [2] 95 [3] 12 [4] 9 [5] 18 Hits@level+ = [0+] 278 [1+] 177 [2+] 134 [3+] 39 [4+] 27 [5+] 18 Hits/KSLOC@level+ = [0+] 35.9684 [1+] 22.9008 [2+] 17.3373 [3+] 5.04593 [4+] 3.49334 [5+] 2.32889 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.