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/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/Alignment.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/Alignment.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/AlnGraphBoost.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/AlnGraphBoost.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/AlnProvider.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/BlasrM5AlnProvider.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/BlasrM5AlnProvider.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/BoundedBuffer.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/DazAlnProvider.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/DazAlnProvider.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/ProgramOpts.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/SimpleAligner.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/SimpleAligner.hpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/dazcon.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/main.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/AlignmentTest.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/AlnGraphBoostTest.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/SimpleAlignerTest.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/TargetHitTest.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/TargetTest.cpp Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/daligner-include/align.c Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/daligner-include/align.h Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c Examining data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.h FINAL RESULTS: data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:179:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cat,"%s%s%s%s",path,sep,root,suffix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:200:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sfx,"%s%d%s",left,num,right); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:223:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cat,"%s%s%s%s",path,sep,root,suffix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:244:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sfx,"%s%d%s",left,num,right); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:506: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(dbfile,DB_NFILE,&nfiles) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:538:11: [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(dbfile,DB_FDATA,&nread,buf1,buf2) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:554: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(dbfile,DB_NBLOCK,&nblocks) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:557: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(dbfile,DB_PARAMS,&size,&cutoff,&all) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:567:13: [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(dbfile,DB_BDATA,stub->ublocks+i,stub->tblocks+i) != 2) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:604: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(dbfile,DB_NFILE,&nfiles) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:609: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(dbfile,DB_NBLOCK,&nblocks) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:617: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(dbfile,DB_PARAMS,&size,&cutoff,&all) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:620:9: [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(dbfile,DB_BDATA,&ufirst,&tfirst) != 2) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:622: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(dbfile,DB_BDATA,&ulast,&tlast) != 2) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:761:9: [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(dbvis,DB_NFILE,&nfiles) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:766:11: [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(dbvis,DB_FDATA,&tlast,fname,prolog) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:770:9: [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(dbvis,DB_NBLOCK,&nblocks) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:781:13: [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(dbvis,DB_PARAMS,&size,&cutoff,&all) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:793:15: [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(dbvis,DB_BDATA,&ufirst,&tfirst) != 2) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:797:13: [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(dbvis,DB_BDATA,&ulast,&tlast) != 2) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2365:9: [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(istub,DB_NFILE,&nfiles) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2383:17: [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(istub,DB_FDATA,&last,fname,prolog) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2394:17: [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(istub,DB_FDATA,&last,fname,prolog) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2415:16: [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. (void) fscanf(istub,DB_NFILE,&nfiles); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2419:20: [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. { (void) fscanf(istub,DB_FDATA,&last,fname,prolog); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2424:20: [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. { (void) fscanf(istub,DB_FDATA,&last,fname,prolog); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2483:17: [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(istub,DB_FDATA,&last,fname,prolog) != 3) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2781:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse->slice,"%s/%s",parse->pwd,parse->root); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2783:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse->slice,"%s/%s%c%d-%d%s",parse->pwd,parse->root,BLOCK_SYMBOL,parse->next+1, data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2885:11: [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(dbfile,DB_NFILE,&nfiles) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2890:11: [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(dbfile,DB_NBLOCK,&nblocks) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:39:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define EPRINTF sprintf data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:45:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define EPRINTF fprintf data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:159:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. { if (fprintf(file,__VA_ARGS__) < 0) \ data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:164:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. { if (printf(__VA_ARGS__) < 0) \ data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:194:9: [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,__VA_ARGS__) != Count_Args(#__VA_ARGS__)-1) \ data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/DazAlnProvider.cpp:32:10: [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). std::strcpy(path,popts_.seqFile.c_str()); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:204:30: [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). # define STRCAT(a, b, len) strcat(a, b) data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:205:30: [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). # define STRCPY(a, b, len) strcpy(a, b) data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1466:21: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((proc = popen(command, "r")) == nullptr) { data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:949:9: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&m_underlyingMutex); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:965:9: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&m_underlyingMutex); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1492:27: [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* val = getenv(variableName); data/pbdagcon-0.3+git20180411.c14c422+dfsg/test/cpp/AlignmentTest.cpp:12:23: [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. char const* val = getenv("PBDAGCON_TEST_DATA_DIR"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/daligner-include/align.c:3292:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ToL[8] = { 'a', 'c', 'g', 't', '.', '[', ']', '-' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/daligner-include/align.c:3293:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ToU[8] = { 'A', 'C', 'G', 'T', '.', '[', ']', '-' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:42:1: [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 Ebuffer[1000]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:107: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). if ((f = fopen(name,mode)) == NULL) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:334:13: [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. *s++ = (char ) ((s0[i] << 6) | (s1[i] << 4) | (s2[i] << 2) | s3[i]); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:368:10: [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 letter[4] = { 'a', 'c', 'g', 't' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:376:10: [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 letter[4] = { 'A', 'C', 'G', 'T' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:384:10: [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 letter[4] = { '1', '2', '3', '4' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:394:10: [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 number[128] = data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:419:10: [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 arrow[128] = data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:444:10: [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 change[128] = data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:482: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 buf1[MAX_NAME+100]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:483: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 buf2[MAX_NAME+100]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c: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 buffer[2*MAX_NAME+100]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:728:16: [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). if ((dbvis = fopen(cat,"r")) == NULL) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:740:20: [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). if ((dbvis = fopen(cat,"r")) == NULL) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:758: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 fname[MAX_NAME], prolog[MAX_NAME]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1650:16: [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). { afile = fopen(MyCatenate(db->path,MyNumbered_Suffix(".",db->part,"."),track,".anno"),"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1654:16: [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). { afile = fopen(MyCatenate(db->path,".",track,".anno"),"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1820:16: [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). { afile = fopen(MyCatenate(db->path,MyNumbered_Suffix(".",db->part,"."),track,".anno"),"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1824: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). { afile = fopen(MyCatenate(db->path,".",track,".anno"),"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1844:11: [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). dfile = fopen(name,"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2362: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 prolog[MAX_NAME], fname[MAX_NAME]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2702:16: [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). if ((input = fopen(MyCatenate(parse->pwd,"/",disp,".las"),"r")) == NULL) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2869: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 buffer[2*MAX_NAME+100]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2875:16: [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). dbfile = fopen(dbname,"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2878:20: [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). dbfile = fopen(dbname,"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/BlasrM5AlnProvider.cpp:18: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). fs_.open(fpath_); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/DazAlnProvider.cpp:18:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ToU[8] = { 'A', 'C', 'G', 'T', '.', '[', ']', '-' }; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/DazAlnProvider.cpp:43:14: [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). input_ = fopen(popts_.alnFile.c_str(),"r"); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:132:10: [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 buff[256]; strerror_s(buff, 256, errno); \ data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1375:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char localBuff[10] = ""; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1427:16: [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 buffer[bufferLen]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1437:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char propVal[PROP_VALUE_MAX + 1]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1470:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hBuff[4096]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1605:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff_[kBuffSize] = ""; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3075:16: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atol(confVal.c_str()); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3167:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fs->open(fname, std::fstream::out | std::fstream::trunc); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3804:22: [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). setLevel(atoi(commandLineArgs->getParamValue("--v"))); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3806:22: [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). setLevel(atoi(commandLineArgs->getParamValue("--V"))); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:4132:23: [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). m_flags = atoi(m_commandLineArgs.getParamValue(base::consts::kLoggingFlagsParam)); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:4373:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[base::consts::kSourceFilenameMaxLength + base::consts::kSourceLineMaxLength] = ""; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:5078:13: [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 buff[256]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:147:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { epos = strlen(find); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:148:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). epos -= strlen(suffix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:167: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). len = strlen(path); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:168: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). len += strlen(sep); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:169: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). len += strlen(root); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:170: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). len += strlen(suffix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:190: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). len = strlen(left); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:191: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). len += strlen(right) + 40; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:211: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). len = strlen(path); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:212: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). len += strlen(sep); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:213: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). len += strlen(root); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:214: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). len += strlen(suffix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:234: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). len = strlen(left); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:235: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). len += strlen(right) + 40; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:697: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). plen = strlen(path); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1045:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen(db->path)+1 data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1060:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen(t->name)+1 data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1093:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). plen = strlen(path); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1098: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). rlen = strlen(root); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1136:14: [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). dlen = strlen(name); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1213:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { char *read; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1227:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int Load_Read(DAZZ_DB *db, int i, char *read, int ascii) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1240:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(read,(char *) bases + r[i].boff,len); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1240:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strncpy(read,(char *) bases + r[i].boff,len); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1242:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (*read < 4) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1243:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1243:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1245:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1246:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Number_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1247:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1251:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (*read < 4) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1252:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1254:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Lower_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1256:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Upper_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1257:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1260:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1261:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ascii == 1) != islower(*read)) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1262:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Change_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1264:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1276:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (fread(read,clen,1,bases) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1281:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Uncompress_Read(len,read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1283:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { Lower_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1284:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1287:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { Upper_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1288:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1291:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1303:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char *Load_Subread(DAZZ_DB *db, int i, int beg, int end, char *read, int ascii) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1317:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(read,(char *) bases + r[i].boff + beg,len); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1317:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strncpy(read,(char *) bases + r[i].boff + beg,len); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1319:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (*read < 4) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1320:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1320:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1322:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1323:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Number_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1324:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1328:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (*read < 4) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1329:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1331:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Lower_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1333:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Upper_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1334:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1337:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { read[len] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1338:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ascii == 1) != islower(*read)) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1339:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Change_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1341:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1343:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1356:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (fread(read,clen,1,bases) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1361:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Uncompress_Read(4*clen,read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1363:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[len] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1365:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { Lower_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1366:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1369:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { Upper_Read(read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1370:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1373:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[-1] = 4; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1375:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1705:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DAZZ_READ read; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1731:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (fread(&read,sizeof(DAZZ_READ),1,indx) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1736:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1736:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1750:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (fread(&read,sizeof(DAZZ_READ),1,indx) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1755:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1755:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1771:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { if (fread(&read,sizeof(DAZZ_READ),1,indx) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1776:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:1776:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((read.flags & DB_BEST) >= allflag && read.rlen >= cutoff) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2036:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). { strncpy(data,(void *) track->data + off,len); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2268: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). slen = strlen(extra->name); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2428:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { DAZZ_READ read; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2431:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fread(&read,sizeof(DAZZ_READ),1,indx) != 1) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2436:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fseeko(quiva,read.coff,SEEK_SET); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2769:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { int size = strlen(parse->pwd) + strlen(Block_Arg_Root(parse)) + 30; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2769:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { int size = strlen(parse->pwd) + strlen(Block_Arg_Root(parse)) + 30; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.c:2801:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { int len = strlen(arg); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:537:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int Load_Read(DAZZ_DB *db, int i, char *read, int ascii); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:546:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char *Load_Subread(DAZZ_DB *db, int i, int beg, int end, char *read, int ascii); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/DB.h:573:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int Load_Arrow(DAZZ_DB *db, int i, char *read, int ascii); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:386:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static void Encode(HScheme *scheme, FILE *out, uint8 *read, int rlen) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:428:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { x = read[k]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:448:72: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static void Encode_Run(HScheme *neme, HScheme *reme, FILE *out, uint8 *read, int rlen, int rchar) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:477:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (k < rlen && read[k] == rchar) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:489:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { x = read[k]; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:510:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static int Decode(HScheme *scheme, FILE *in, char *read, int rlen) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:583:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j] = (char) c; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:595:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j] = (char) c; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:604:69: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static int Decode_Run(HScheme *neme, HScheme *reme, FILE *in, char *read, data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:650:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j++] = (char) rchar; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:661:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j] = (char) c; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:675:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j++] = (char) rchar; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:686:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read[j] = (char) c; data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:770: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). rlen = strlen(Read); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:782:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rlen += strlen(Read+rlen); data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:792:25: [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 (rlen != (int) strlen(other)) data/pbdagcon-0.3+git20180411.c14c422+dfsg/debian/dazzdb-include/QV.c:1195:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(coding->prefix); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:441:24: [1] (buffer) wcslen: 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). # define ELPP_STRLEN wcslen data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:454:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define ELPP_STRLEN strlen data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1193:38: [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). std::size_t sizeOfFilename = strlen(filename); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1210:38: [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). std::size_t sizeOfFilename = strlen(filename); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1356:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s1) != strlen(s2)) return false; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1356:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s1) != strlen(s2)) return false; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1404:28: [1] (buffer) wcslen: 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). std::size_t len_ = wcslen(line) + 1; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1473:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (hBuff[strlen(hBuff) - 1] == '\n') { data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1474:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hBuff[strlen(hBuff) - 1] = '\0'; data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:1751:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (v != nullptr && strlen(v) > 0) { data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3709:70: [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). std::string chr(ss.str().substr(0, ss.str().size() - strlen(prev))); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:3714:70: [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). std::string chr(ss.str().substr(0, ss.str().size() - strlen(sfx))); data/pbdagcon-0.3+git20180411.c14c422+dfsg/src/cpp/third-party/easylogging++.h:5678:38: [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 (sourceFile != nullptr && strlen(sourceFile) > 0) { ANALYSIS SUMMARY: Hits = 212 Lines analyzed = 20493 in approximately 0.51 seconds (40030 lines/second) Physical Source Lines of Code (SLOC) = 16270 Hits@level = [0] 320 [1] 125 [2] 43 [3] 4 [4] 40 [5] 0 Hits@level+ = [0+] 532 [1+] 212 [2+] 87 [3+] 44 [4+] 40 [5+] 0 Hits/KSLOC@level+ = [0+] 32.6982 [1+] 13.0301 [2+] 5.34726 [3+] 2.70436 [4+] 2.45851 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.