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/analog-6.0/src/build/riscos/anlghead.h Examining data/analog-6.0/src/bzip2/blocksort.c Examining data/analog-6.0/src/bzip2/bzlib.c Examining data/analog-6.0/src/bzip2/bzlib.h Examining data/analog-6.0/src/bzip2/bzlib_private.h Examining data/analog-6.0/src/bzip2/compress.c Examining data/analog-6.0/src/bzip2/crctable.c Examining data/analog-6.0/src/bzip2/decompress.c Examining data/analog-6.0/src/bzip2/huffman.c Examining data/analog-6.0/src/bzip2/randtable.c Examining data/analog-6.0/src/libgd/gd.c Examining data/analog-6.0/src/libgd/gd.h Examining data/analog-6.0/src/libgd/gd_io.c Examining data/analog-6.0/src/libgd/gd_io.h Examining data/analog-6.0/src/libgd/gd_io_file.c Examining data/analog-6.0/src/libgd/gd_png.c Examining data/analog-6.0/src/libgd/gdfontf.c Examining data/analog-6.0/src/libgd/gdfontf.h Examining data/analog-6.0/src/libgd/gdfonts.c Examining data/analog-6.0/src/libgd/gdfonts.h Examining data/analog-6.0/src/libgd/gdtables.c Examining data/analog-6.0/src/libpng/png.c Examining data/analog-6.0/src/libpng/png.h Examining data/analog-6.0/src/libpng/pngconf.h Examining data/analog-6.0/src/libpng/pngerror.c Examining data/analog-6.0/src/libpng/pngmem.c Examining data/analog-6.0/src/libpng/pngset.c Examining data/analog-6.0/src/libpng/pngtrans.c Examining data/analog-6.0/src/libpng/pngwio.c Examining data/analog-6.0/src/libpng/pngwrite.c Examining data/analog-6.0/src/libpng/pngwtran.c Examining data/analog-6.0/src/libpng/pngwutil.c Examining data/analog-6.0/src/pcre/pcre.c Examining data/analog-6.0/src/pcre/pcre.h Examining data/analog-6.0/src/pcre/pcrechar.h Examining data/analog-6.0/src/pcre/pcreintl.h Examining data/analog-6.0/src/unzip/ioapi.c Examining data/analog-6.0/src/unzip/ioapi.h Examining data/analog-6.0/src/unzip/unzip.c Examining data/analog-6.0/src/unzip/unzip.h Examining data/analog-6.0/src/zlib/adler32.c Examining data/analog-6.0/src/zlib/compress.c Examining data/analog-6.0/src/zlib/crc32.c Examining data/analog-6.0/src/zlib/deflate.c Examining data/analog-6.0/src/zlib/deflate.h Examining data/analog-6.0/src/zlib/gzio.c Examining data/analog-6.0/src/zlib/infblock.c Examining data/analog-6.0/src/zlib/infblock.h Examining data/analog-6.0/src/zlib/infcodes.c Examining data/analog-6.0/src/zlib/infcodes.h Examining data/analog-6.0/src/zlib/inffast.c Examining data/analog-6.0/src/zlib/inffast.h Examining data/analog-6.0/src/zlib/inffixed.h Examining data/analog-6.0/src/zlib/inflate.c Examining data/analog-6.0/src/zlib/inftrees.c Examining data/analog-6.0/src/zlib/inftrees.h Examining data/analog-6.0/src/zlib/infutil.c Examining data/analog-6.0/src/zlib/infutil.h Examining data/analog-6.0/src/zlib/trees.c Examining data/analog-6.0/src/zlib/trees.h Examining data/analog-6.0/src/zlib/uncompr.c Examining data/analog-6.0/src/zlib/zconf.h Examining data/analog-6.0/src/zlib/zlib.h Examining data/analog-6.0/src/zlib/zutil.c Examining data/analog-6.0/src/zlib/zutil.h Examining data/analog-6.0/src/analog.c Examining data/analog-6.0/src/anlghea3.h Examining data/analog-6.0/src/anlghea4.h Examining data/analog-6.0/src/anlghead.h Examining data/analog-6.0/src/cache.c Examining data/analog-6.0/src/dates.c Examining data/analog-6.0/src/hash.c Examining data/analog-6.0/src/init.c Examining data/analog-6.0/src/init2.c Examining data/analog-6.0/src/macdir.h Examining data/analog-6.0/src/macinput.c Examining data/analog-6.0/src/macstuff.c Examining data/analog-6.0/src/outcro.c Examining data/analog-6.0/src/outhtml.c Examining data/analog-6.0/src/outlatex.c Examining data/analog-6.0/src/outplain.c Examining data/analog-6.0/src/output.c Examining data/analog-6.0/src/output2.c Examining data/analog-6.0/src/outxhtml.c Examining data/analog-6.0/src/outxml.h Examining data/analog-6.0/src/process.c Examining data/analog-6.0/src/settings.c Examining data/analog-6.0/src/sort.c Examining data/analog-6.0/src/win32.c Examining data/analog-6.0/src/alias.c Examining data/analog-6.0/src/anlghea2.h Examining data/analog-6.0/src/utils.c Examining data/analog-6.0/src/input.c Examining data/analog-6.0/src/tree.c Examining data/analog-6.0/src/globals.c Examining data/analog-6.0/src/outxml.c FINAL RESULTS: data/analog-6.0/src/alias.c:32:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/alias.c:683:7: [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(lp->name, name); /* NB don't use lp->own */ data/analog-6.0/src/alias.c:689: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((char *)(lp->other), alias); data/analog-6.0/src/alias.c:694:2: [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((char *)(lp->other), name); data/analog-6.0/src/alias.c:724: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((char *)(lp->other), alias); data/analog-6.0/src/alias.c:728:2: [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(name, (char *)(lp->other)); data/analog-6.0/src/alias.c:759:5: [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(s, to->string); data/analog-6.0/src/anlghea3.h:130:9: [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. #define popen _popen data/analog-6.0/src/anlghea3.h:1127:19: [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. #define POPENR(s) popen(s, "rb") data/analog-6.0/src/anlghea3.h:1129:19: [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. #define POPENR(s) popen(s, "r") data/analog-6.0/src/anlghea3.h:1137:24: [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(s, z);} /* z needed so n only evaluated once */ data/analog-6.0/src/bzip2/bzlib.c:1440:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(mode2, writing ? "w" : "r" ); data/analog-6.0/src/bzip2/bzlib_private.h:103:7: [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. fprintf ( stderr, \ data/analog-6.0/src/bzip2/bzlib_private.h:111:4: [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. fprintf(stderr,zf) data/analog-6.0/src/bzip2/bzlib_private.h:113:4: [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. fprintf(stderr,zf,za1) data/analog-6.0/src/bzip2/bzlib_private.h:115:4: [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. fprintf(stderr,zf,za1,za2) data/analog-6.0/src/bzip2/bzlib_private.h:117:4: [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. fprintf(stderr,zf,za1,za2,za3) data/analog-6.0/src/bzip2/bzlib_private.h:119:4: [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. fprintf(stderr,zf,za1,za2,za3,za4) data/analog-6.0/src/bzip2/bzlib_private.h:121:4: [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. fprintf(stderr,zf,za1,za2,za3,za4,za5) data/analog-6.0/src/globals.c:233:74: [4] (shell) system: 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. #error Unimplemented EBCDIC platform. Please send information about your system to <martin@apache.org>! data/analog-6.0/src/globals.c:309:74: [4] (shell) system: 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. #error Unimplemented EBCDIC platform. Please send information about your system to <martin@apache.org>! data/analog-6.0/src/globals.c:1273:5: [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(pathcp, path); data/analog-6.0/src/globals.c:1276:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(t, "%s%c%s", s, DIRSEP, commandname); data/analog-6.0/src/globals.c:1277:56: [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. if ((commandpath = realpath(t, NULL)) != NULL && access(commandpath, X_OK) == 0 && data/analog-6.0/src/globals.c:1285:5: [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(commandpath, commandname); data/analog-6.0/src/init.c:48:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(u, "PLAIN:%s (%s)", arg1, arg2); data/analog-6.0/src/init.c:62:2: [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(u, arg1); /* or name will get obliterated before fclose */ data/analog-6.0/src/init.c:887:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ss, "PLAIN:%s", t); confline(op, c, f, ss, -1) data/analog-6.0/src/init2.c:397:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%s%c%clng", country, (op->outstyle == ASCII)?'a':'h', data/analog-6.0/src/init2.c:403:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%s%clng", country, EXTSEP); data/analog-6.0/src/init2.c:413:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%s%cdom%ctab", country, data/analog-6.0/src/init2.c:421:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%sdom%ctab", country, EXTSEP); data/analog-6.0/src/init2.c:435:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%s%cdesc%ctxt", country, data/analog-6.0/src/init2.c:443:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(partname, "%sdesc%ctxt", country, EXTSEP); data/analog-6.0/src/init2.c:670:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(*s, arg1); data/analog-6.0/src/init2.c:983:5: [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 ( related, result ); data/analog-6.0/src/init2.c:1015:5: [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(s, arg1); /* can't strtok arg1 directly in case it's const */ data/analog-6.0/src/init2.c:1423:5: [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(ans->string, s + 6); data/analog-6.0/src/input.c:61:7: [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(lf->name, lf->next->name); /* lf->next is a clone of lf */ data/analog-6.0/src/input.c:112:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "%s \"%s\"", up->data, lf->name); data/analog-6.0/src/input.c:114:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "%s %s", up->data, lf->name); data/analog-6.0/src/input.c:173:5: [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(lf->name, lf->next->name); /* lf->next is a clone of lf */ data/analog-6.0/src/input.c:1803:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(v, "PLAIN:.%s (%s)", s, t); data/analog-6.0/src/libpng/pngconf.h:365:23: [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 png_strcpy strcpy data/analog-6.0/src/macstuff.c:381:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void)strcpy(hostname, hInfoMacTCP.cname); data/analog-6.0/src/outcro.c:267:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outhtml.c:503:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outhtml.c:1116:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(caption, lngstr[chartby_]); data/analog-6.0/src/outhtml.c:1119:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(caption, lngstr[method2sort[requests]]); data/analog-6.0/src/outhtml.c:1121:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(caption, lngstr[method2sort[requests7]]); data/analog-6.0/src/outhtml.c:1123:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(caption, lngstr[method2sort[chartby]]); data/analog-6.0/src/outhtml.c:1181: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(t, s); data/analog-6.0/src/outhtml.c:1222:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outhtml.c:1336:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s%s%c%s", od->localchartdir, anchorname[rep], EXTSEP, data/analog-6.0/src/outhtml.c:1345:7: [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(workspace, wedge[i].name); data/analog-6.0/src/outlatex.c:454:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outplain.c:387:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/output.c:514:7: [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(workspace, p->name); data/analog-6.0/src/output2.c:492:7: [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(workspace, name); data/analog-6.0/src/output2.c:572:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(t, lngstr[firsts], gens); data/analog-6.0/src/output2.c:579:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(t, lngstr[firstds], temp, genp); data/analog-6.0/src/output2.c:598:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(t, lngstr[alls], genp); data/analog-6.0/src/output2.c:759:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bcolname, "%s%s%s", colname, lngstr[byteprefixabbr_ + bm], data/analog-6.0/src/outxhtml.c:562:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outxml.c:550:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(workspace, name); data/analog-6.0/src/outxml.c:807:4: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. r=vfprintf( outf, format, v ); data/analog-6.0/src/outxml.h:24:26: [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 XML_OUT( f... ) fprintf( outf, f ) data/analog-6.0/src/outxml.h:43:9: [4] (buffer) sscanf: 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. sscanf( (bfr), "%s %d %d %d:%d:%*d", \ data/analog-6.0/src/settings.c:831:4: [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. printf((temp == 1)?"request\n":"requests\n"); data/analog-6.0/src/settings.c:835:4: [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. printf((temp == 1)?"request for a page\n":"requests for pages\n"); data/analog-6.0/src/settings.c:840:4: [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. printf((temp == 1)?"byte\n":"bytes\n"); data/analog-6.0/src/utils.c:222:5: [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(ans, name); data/analog-6.0/src/utils.c:237:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ans + u, "%s%c", sub, DIRSEP); data/analog-6.0/src/utils.c:240:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ans + t + u, name); data/analog-6.0/src/utils.c:378:3: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(m, fmt, ap); data/analog-6.0/src/utils.c:508:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(errfile, s, ap); data/analog-6.0/src/utils.c:528:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ans + 1, s); data/analog-6.0/src/zlib/gzio.c:107:5: [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(s->path, path); /* do this early for debugging */ data/analog-6.0/src/zlib/gzio.c:532:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(buf, sizeof(buf), format, va); data/analog-6.0/src/zlib/gzio.c:534:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(buf, format, va); data/analog-6.0/src/zlib/gzio.c:555:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, data/analog-6.0/src/zlib/gzio.c:558:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, data/analog-6.0/src/zlib/gzio.c:870:5: [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(s->msg, s->path); data/analog-6.0/src/zlib/gzio.c:872:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(s->msg, m); data/analog-6.0/src/zlib/zutil.h:193:39: [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 Trace(x) {if (z_verbose>=0) fprintf x ;} data/analog-6.0/src/zlib/zutil.h:194:39: [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 Tracev(x) {if (z_verbose>0) fprintf x ;} data/analog-6.0/src/zlib/zutil.h:195:40: [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 Tracevv(x) {if (z_verbose>1) fprintf x ;} data/analog-6.0/src/zlib/zutil.h:196:48: [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 Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/analog-6.0/src/zlib/zutil.h:197:49: [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 Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/analog-6.0/src/globals.c:1271:15: [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. (path = getenv("PATH")) != NULL) { data/analog-6.0/src/globals.c:1277:26: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if ((commandpath = realpath(t, NULL)) != NULL && access(commandpath, X_OK) == 0 && data/analog-6.0/src/globals.c:1282:27: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. else if ((commandpath = realpath(commandname, NULL)) != NULL) data/analog-6.0/src/alias.c:60:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)submalloc(mp, len + 1), (void *)workspace, len); data/analog-6.0/src/alias.c:161:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)(e2 - dirsufflength), (void *)e2, (size_t)(e1 - e2) + 1); data/analog-6.0/src/alias.c:342:26: [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). if (defaultport == atoi(c + 1)) { data/analog-6.0/src/alias.c:547:8: [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(name + 8, s, t - s); data/analog-6.0/src/alias.c:762:7: [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((void *)s, (void *)(name + pm[0]), (size_t)(pm[1] - pm[0])); data/analog-6.0/src/alias.c:867:7: [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(submalloc(mm, len + 1), mms->curr_pos, len + 1); data/analog-6.0/src/alias.c:897: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((void *)(s + m), (void *)t3, (size_t)(t2 - t3 + 1)); data/analog-6.0/src/alias.c:909: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((void *)(s + m), (void *)t3, (size_t)(t2 - t3 + 1)); data/analog-6.0/src/alias.c:913: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((void *)(p->name), (void *)s, m); data/analog-6.0/src/alias.c:923: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((void *)(s + m), (void *)(t1 + 1), (size_t)(t2 - t1 - 1)); data/analog-6.0/src/alias.c:929: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((void *)(s + m), (void *)t1, (size_t)(t2 - t1)); data/analog-6.0/src/alias.c:932: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((void *)(p->name), (void *)s, m); data/analog-6.0/src/anlghea3.h:98:19: [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). #define FOPENR(s) fopen(s, "r", "shr=upd") data/analog-6.0/src/anlghea3.h:219:19: [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). #define FOPENR(s) fopen(s, "r,ccsid=37") data/analog-6.0/src/anlghea3.h:220:19: [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). #define FOPENW(s) fopen(s, "w,ccsid=37") data/analog-6.0/src/anlghea3.h:221: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). #define FOPENWB(s) fopen(s, "wb,ccsid=37") data/analog-6.0/src/anlghea3.h:222:19: [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). #define FOPENA(s) fopen(s, "a,ccsid=37") data/analog-6.0/src/anlghea3.h:285:9: [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). #define fopen(name,mode) mac_fopen((name),(mode)) data/analog-6.0/src/anlghea3.h:1000: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 graph[DATEREP_NUMBER]; data/analog-6.0/src/anlghea3.h:1007: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 *dayname[7], *monthname[12], **lngstr, *descstr[REP_NUMBER]; data/analog-6.0/src/anlghea3.h:1111:19: [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). #define FOPENR(s) fopen(s, "rb") data/analog-6.0/src/anlghea3.h:1113:19: [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). #define FOPENR(s) fopen(s, "r") data/analog-6.0/src/anlghea3.h:1117:19: [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). #define FOPENW(s) fopen(s, "w") data/analog-6.0/src/anlghea3.h:1120: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). #define FOPENWB(s) fopen(s, "wb") data/analog-6.0/src/anlghea3.h:1123:19: [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). #define FOPENA(s) fopen(s, "a") data/analog-6.0/src/anlghea3.h:1163:6: [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((void *)s, (void *)t, l); s += l; \ data/analog-6.0/src/anlghea4.h:53:25: [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. extern void outputcache(char *outfile, Hashindex **gooditems, Dateman *dman, data/analog-6.0/src/anlghea4.h:973:28: [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. extern Hashindex *treefind(char *name, char *nameend, Hashtable **tree, data/analog-6.0/src/anlghea4.h:973:40: [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. extern Hashindex *treefind(char *name, char *nameend, Hashtable **tree, data/analog-6.0/src/anlghea4.h:1001:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char convfloor, logical multibyte, choice rep, data/analog-6.0/src/bzip2/bzlib.c:1413:4: [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 unused[BZ_MAX_UNUSED]; data/analog-6.0/src/bzip2/bzlib.c:1416:4: [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 mode2[10] = ""; data/analog-6.0/src/bzip2/bzlib.c:1448: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). fp = fopen(path,mode2); data/analog-6.0/src/cache.c:16:18: [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. void outputcache(char *outfile, Hashindex **gooditems, Dateman *dman, data/analog-6.0/src/cache.c:48:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i = open(outfile, O_WRONLY | O_CREAT | O_EXCL, OPEN_MODE)) < 0) { data/analog-6.0/src/cache.c:259:30: [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). (*code = (unsigned int)atoi(parsestart)) >= maxcode || data/analog-6.0/src/cache.c:287: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(submalloc(mm, (size_t)(temps2 - temps) + 1), (void *)temps, data/analog-6.0/src/cache.c:514:33: [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). datecode = (unsigned int)atoi(record_start); data/analog-6.0/src/globals.c:96: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 *engmonths[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", data/analog-6.0/src/globals.c:98: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 *englongdays[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", data/analog-6.0/src/globals.c:100: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 *engshortdays[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; data/analog-6.0/src/globals.c:161: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. const unsigned char os_toascii[256] = { data/analog-6.0/src/globals.c:237: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. const unsigned char os_toebcdic[256] = { data/analog-6.0/src/init.c:36: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 u[265]; /* see nextconfline() and uses of u below */ data/analog-6.0/src/init.c:924: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 temps[10]; /* for "ukdom.tab" */ data/analog-6.0/src/init.c:1034:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temps, "ukdom%ctab", EXTSEP); data/analog-6.0/src/init.c:1389: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). if ((i = open(dnslockfile, O_WRONLY | O_CREAT | O_EXCL, OPEN_MODE)) < 0) { data/analog-6.0/src/init.c:1634:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%b"); data/analog-6.0/src/init.c:1636:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%u"); data/analog-6.0/src/init.c:1638:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%S"); data/analog-6.0/src/init.c:1640:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%c"); data/analog-6.0/src/init.c:1642:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%r"); data/analog-6.0/src/init.c:1644:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%j%w%r%wHTTP%j"); data/analog-6.0/src/init.c:1646:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "[%d/%M/%Y:%h:%n:%j]"); data/analog-6.0/src/init.c:1648:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%t"); data/analog-6.0/src/init.c:1650:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%D"); data/analog-6.0/src/init.c:1652:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%q"); data/analog-6.0/src/init.c:1654:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%v"); data/analog-6.0/src/init.c:1656:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%v"); data/analog-6.0/src/init.c:1660:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%B"); data/analog-6.0/src/init.c:1664:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%f"); data/analog-6.0/src/init.c:1676:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ans, "%j"); data/analog-6.0/src/init2.c:390: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 partname[13]; data/analog-6.0/src/init2.c:768: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(ans, from, sizeof(Logfile)); data/analog-6.0/src/init2.c:818:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dirname, ".%c", DIRSEP); data/analog-6.0/src/init2.c:824:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)dirname, (void *)(lp->name), (size_t)(c - lp->name) + 1); data/analog-6.0/src/init2.c:845:7: [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((void *)(dirname + dirlen), (void *)(filep->d_name), len + 1); data/analog-6.0/src/init2.c:862: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 name[255]; /* WARNING: arbitrary limit */ data/analog-6.0/src/init2.c:881:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)dirname, (void *)(lp->name), (size_t)(c - lp->name)); data/analog-6.0/src/init2.c:887: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(filename, dirname, dirlen); data/analog-6.0/src/init2.c:903:7: [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((void *)(filename + dirlen + path), data/analog-6.0/src/init2.c:933:7: [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((void *)dirname, (void *)(lp->name), (size_t)(c - lp->name) + 1); data/analog-6.0/src/init2.c:942:7: [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((void *)(dirname + dirlen), (void *)(file.name), len + 1); data/analog-6.0/src/init2.c:960: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 fspec[VMS_FSPEC_MAX], related[VMS_FSPEC_MAX]; data/analog-6.0/src/init2.c:961: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 result[VMS_FSPEC_MAX]; data/analog-6.0/src/init2.c:1439:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(atp->string, s, t - s); data/analog-6.0/src/init2.c:1667:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((*include)->name, "pages"); data/analog-6.0/src/input.c:19: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 gzmagic[2] = {(char)0x1f, (char)0x8b}; data/analog-6.0/src/input.c:20: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 zipmagic[4] = {'P', 'K', 0x03, 0x04}; data/analog-6.0/src/input.c:21: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 bz2magic[3] = {'B', 'Z', 'h'}; data/analog-6.0/src/input.c:34: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 magic[5]; data/analog-6.0/src/input.c:372: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(newlf, lf, sizeof(Logfile)); data/analog-6.0/src/input.c:429:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(unusedData, unusedPtr, unusedCount); data/analog-6.0/src/input.c:1090: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(submalloc(m, length + 1), (void *)string_start, length); data/analog-6.0/src/input.c:1169: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(submalloc(m, length + 1), (void *)string_start, length); data/analog-6.0/src/input.c:1398:2: [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(fmt, "COMMON"); data/analog-6.0/src/input.c:1400:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%m/%d/%Z"); data/analog-6.0/src/input.c:1402:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%W%h:%n:%j"); data/analog-6.0/src/input.c:1404:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%C"); data/analog-6.0/src/input.c:1407:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%c"); data/analog-6.0/src/input.c:1410:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%r"); data/analog-6.0/src/input.c:1412:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%b"); data/analog-6.0/src/input.c:1415:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%S"); data/analog-6.0/src/input.c:1417:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%s"); data/analog-6.0/src/input.c:1419:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%f"); data/analog-6.0/src/input.c:1421:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%f\""); data/analog-6.0/src/input.c:1423:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%B"); data/analog-6.0/src/input.c:1425:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%B\""); data/analog-6.0/src/input.c:1427:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%v\""); data/analog-6.0/src/input.c:1429:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%v"); data/analog-6.0/src/input.c:1431:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%q"); data/analog-6.0/src/input.c:1433:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%u"); data/analog-6.0/src/input.c:1435:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%t"); data/analog-6.0/src/input.c:1437:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%j"); data/analog-6.0/src/input.c:1469:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%w"); data/analog-6.0/src/input.c:1471:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%Y-%m-%d"); data/analog-6.0/src/input.c:1473:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%h:%n:%j"); data/analog-6.0/src/input.c:1475:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%b"); data/analog-6.0/src/input.c:1477:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%c"); data/analog-6.0/src/input.c:1479:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%S"); data/analog-6.0/src/input.c:1481:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%s"); data/analog-6.0/src/input.c:1483:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%r"); data/analog-6.0/src/input.c:1486:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%f"); data/analog-6.0/src/input.c:1488:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%f\""); data/analog-6.0/src/input.c:1492:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%A"); data/analog-6.0/src/input.c:1494:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%B\""); data/analog-6.0/src/input.c:1498:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%S"); data/analog-6.0/src/input.c:1500:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%v"); data/analog-6.0/src/input.c:1503:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%v\""); data/analog-6.0/src/input.c:1507:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%v"); data/analog-6.0/src/input.c:1509:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%q"); data/analog-6.0/src/input.c:1511:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "\"%u\""); data/analog-6.0/src/input.c:1513:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%u"); data/analog-6.0/src/input.c:1516:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%T"); data/analog-6.0/src/input.c:1518:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%t"); data/analog-6.0/src/input.c:1521:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%j"); data/analog-6.0/src/input.c:1556:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%S"); data/analog-6.0/src/input.c:1559:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%u"); data/analog-6.0/src/input.c:1561:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%d/%M/%Y:%h:%n:%j"); data/analog-6.0/src/input.c:1564:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%j%w%r%wHTTP%j"); data/analog-6.0/src/input.c:1566:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%c"); data/analog-6.0/src/input.c:1570:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%b"); data/analog-6.0/src/input.c:1572:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%f"); data/analog-6.0/src/input.c:1574:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%B"); data/analog-6.0/src/input.c:1576:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%v"); data/analog-6.0/src/input.c:1579:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%t"); data/analog-6.0/src/input.c:1581:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fmt, "%j"); data/analog-6.0/src/input.c:1766: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 *s, *t, *c, *u, v[256]; data/analog-6.0/src/libgd/gd.c:43:16: [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). im->open[i] = 1; data/analog-6.0/src/libgd/gd.c:73: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). if (im->open[i]) { data/analog-6.0/src/libgd/gd.c:88:6: [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). im->open[ct] = 0; data/analog-6.0/src/libgd/gd.c:94:6: [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). im->open[color] = 1; data/analog-6.0/src/libgd/gd.h:33:6: [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). int open[gdMaxColors]; data/analog-6.0/src/libgd/gd_png.c:73:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int *open = im->open; data/analog-6.0/src/libgd/gd_png.c:106:29: [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). (transparent >= 0 && open[transparent])) data/analog-6.0/src/libgd/gd_png.c:114:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!open[i]) { data/analog-6.0/src/libpng/png.c:19: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 png_libpng_ver[12] = "1.0.6"; data/analog-6.0/src/libpng/pngconf.h:368:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define png_memcpy memcpy data/analog-6.0/src/libpng/pngerror.c:38:18: [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 PNG_CONST char png_digit[16] = { data/analog-6.0/src/libpng/pngerror.c:77:4: [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 msg[16+64]; data/analog-6.0/src/libpng/pngerror.c:85:4: [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 msg[16+64]; data/analog-6.0/src/macdir.h:33: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 d_name[NAME_MAX+1]; data/analog-6.0/src/macinput.c:164: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 mac_do_script[256] = ""; data/analog-6.0/src/macinput.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 c[2]; data/analog-6.0/src/macinput.c:458:7: [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(name,omode); data/analog-6.0/src/macinput.c:464:9: [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). in_fp=fopen(name,"rb"); data/analog-6.0/src/macinput.c:474:36: [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. if (buff[0]==0x1F && ((unsigned char *)buff)[1]==0x8B && buff[2]==8) { data/analog-6.0/src/macinput.c:558: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(ptr,buff+buff_offset,len); data/analog-6.0/src/macstuff.c:36: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 *cmd_vect[64] = { data/analog-6.0/src/macstuff.c:43: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. extern char mac_do_script[256]; data/analog-6.0/src/macstuff.c:171:17: [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 unsigned char fname[257]; // The current file name data/analog-6.0/src/macstuff.c:364:11: [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). tmp=atoi(cptr); data/analog-6.0/src/macstuff.c:511: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 storage[MY_BLOCK_SIZE]; data/analog-6.0/src/macstuff.c:516: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 storage[MY_BIG_SIZE-sizeof(struct my_free *)]; data/analog-6.0/src/macstuff.c:630: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(new_blk,ptr,size); data/analog-6.0/src/outcro.c:433: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[BLOCKSIZE]; data/analog-6.0/src/outhtml.c:747: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[BLOCKSIZE]; data/analog-6.0/src/outhtml.c:797: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 w1[64]; data/analog-6.0/src/outhtml.c:819:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(w, "%%%.2X", os_toascii[*name]); data/analog-6.0/src/outhtml.c:821:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(w, "%%%.2X", (unsigned char)(*name)); data/analog-6.0/src/outhtml.c:874: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 w1[64]; data/analog-6.0/src/outhtml.c:921:2: [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(w, "%%%.2X", os_toascii[*c]); data/analog-6.0/src/outhtml.c:923:2: [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(w, "%%%.2X", (unsigned char)(*c)); data/analog-6.0/src/outhtml.c:1141: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 t[MAXCHARS]; data/analog-6.0/src/outhtml.c:1184: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(t + (MAXCHARS - 3) / 2, "..."); data/analog-6.0/src/outlatex.c:676: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[BLOCKSIZE]; data/analog-6.0/src/outlatex.c:704: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 w1[64]; data/analog-6.0/src/outplain.c:604: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[BLOCKSIZE]; data/analog-6.0/src/output2.c:622:2: [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(t, "%lu", temp); data/analog-6.0/src/output2.c:990: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((void *)dnewname, (void *)namestart, data/analog-6.0/src/output2.c:1012:6: [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((void *)dnewname, (void *)namestart, data/analog-6.0/src/output2.c:1025:6: [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((void *)newname, (void *)namestart, data/analog-6.0/src/outxhtml.c:484: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 code[3]; data/analog-6.0/src/outxhtml.c:836: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[BLOCKSIZE]; data/analog-6.0/src/outxml.c:66: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 buffer[256]; data/analog-6.0/src/outxml.c:94:2: [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( buffer, "%04d%02d%02d%02d%02d", data/analog-6.0/src/outxml.c:870: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( od->cols[i], timerepcols, sizeof(timerepcols) ); data/analog-6.0/src/outxml.c:874: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( od->cols[i], genrepcols, sizeof(genrepcols) ); data/analog-6.0/src/outxml.c:990:16: [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. else outptr+=sprintf( outptr, "[0x%02X]", (unsigned char)c ); data/analog-6.0/src/outxml.h:38: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. extern char *engmonths[12]; data/analog-6.0/src/outxml.h:59:14: [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 const char *column_name[COL_NUMBER], *report_name[REP_NUMBER], *criteria[METHOD_NUMBER]; data/analog-6.0/src/pcre/pcre.c:509:20: [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. strncmp((const char *)ptr, posix_names[yield], len) == 0) return yield; data/analog-6.0/src/pcre/pcre.c:793:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, class, 32); data/analog-6.0/src/pcre/pcre.c:1003:11: [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(code, previous, len); data/analog-6.0/src/pcre/pcre.c:1025:11: [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(code, previous, len); data/analog-6.0/src/pcre/pcre.c:3258:7: [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(offsets + 2, match_block.offset_vector + 2, data/analog-6.0/src/process.c:101: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. name = (char *)(mm[i].curr_pos); data/analog-6.0/src/process.c:166: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(submalloc(&(mm[i]), len + 1), amemman->curr_pos, len + 1); data/analog-6.0/src/process.c:167:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. name = (char *)(mm[i].curr_pos); /* which might have changed */ data/analog-6.0/src/tree.c:19:21: [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. Hashindex *treefind(char *name, char *nameend, Hashtable **tree, data/analog-6.0/src/tree.c:19:33: [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. Hashindex *treefind(char *name, char *nameend, Hashtable **tree, data/analog-6.0/src/tree.c:152:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)(ans->name), (void *)name, (size_t)(nameend - name)); data/analog-6.0/src/tree.c:302: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. unsigned char convfloor, logical multibyte, choice rep, data/analog-6.0/src/tree.c:325: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(submalloc(derv->space, len + 1), (void *)name, len); data/analog-6.0/src/tree.c:405:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, sp->name, l); data/analog-6.0/src/tree.c:413:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, sp->name, l); data/analog-6.0/src/unzip/ioapi.c:85: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). file = fopen(filename, mode_fopen); data/analog-6.0/src/unzip/unzip.c:860: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 szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; data/analog-6.0/src/unzip/unzip.c:1060: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 source[12]; data/analog-6.0/src/utils.c:367: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 m[511]; /* longer than any message we want to produce */ data/analog-6.0/src/zlib/gzio.c:82: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 fmode[80]; /* copy of mode, without the compression level */ data/analog-6.0/src/zlib/gzio.c:197: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 name[20]; data/analog-6.0/src/zlib/gzio.c:200:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "<fd:%d>", fd); /* for debugging */ data/analog-6.0/src/zlib/gzio.c:526:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[Z_PRINTF_BUFSIZE]; data/analog-6.0/src/zlib/gzio.c:551:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[Z_PRINTF_BUFSIZE]; data/analog-6.0/src/zlib/gzio.c:871:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(s->msg, ": "); data/analog-6.0/src/zlib/trees.c:332: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). FILE *header = fopen("trees.h", "w"); data/analog-6.0/src/zlib/zutil.c:15: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 *z_errmsg[10] = { data/analog-6.0/src/zlib/zutil.h:38:14: [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. extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ data/analog-6.0/src/zlib/zutil.h:100:6: [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). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/analog-6.0/src/zlib/zutil.h:146:30: [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). # define F_OPEN(name, mode) fopen((name), (mode)) data/analog-6.0/src/zlib/zutil.h:177:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define zmemcpy memcpy data/analog-6.0/src/alias.c:59: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(workspace); data/analog-6.0/src/alias.c:113:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(c, d, strlen(d) + 1); data/analog-6.0/src/alias.c:126:49: [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). memmove((void *)(c + 1), (void *)(c + 3), strlen(c + 3) + 1); data/analog-6.0/src/alias.c:177:44: [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). memmove((void *)(c + 1), (void *)(c + 2), strlen(c + 2) + 1); data/analog-6.0/src/alias.c:181:44: [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). memmove((void *)(c + 1), (void *)(c + 3), strlen(c + 3) + 1); data/analog-6.0/src/alias.c:189: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). memmove((void *)(c + 1), (void *)d, strlen(d) + 1); data/analog-6.0/src/alias.c:211: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). len = (int)strlen(name) - 1; /* NB offset by 1 */ data/analog-6.0/src/alias.c:218:16: [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 = (int)strlen(name) - 1; data/analog-6.0/src/alias.c:256:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(c, d, strlen(d) + 1); data/analog-6.0/src/alias.c:268:49: [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). memmove((void *)(c + 1), (void *)(c + 3), strlen(c + 3) + 1); data/analog-6.0/src/alias.c:330:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove((void *)(d + 1), (void *)c, strlen(c) + 1); data/analog-6.0/src/alias.c:340: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). memmove((void *)(c + 1), (void *)d, strlen(d) + 1); data/analog-6.0/src/alias.c:346:32: [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). memmove((void *)c, (void *)d, strlen(d) + 1); data/analog-6.0/src/alias.c:356:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*c != '/' && strlen(name) <= BLOCKSIZE - 2) { data/analog-6.0/src/alias.c:357:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove((void *)(c + 1), (void *)c, strlen(c) + 1); data/analog-6.0/src/alias.c:374:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (c = name + strlen(name) - 1; *c == ' ' && c > name; c--) data/analog-6.0/src/alias.c:441:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(name, c, strlen(c) + 1); data/analog-6.0/src/alias.c:456: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). memmove(c + 1, d, strlen(d) + 1); data/analog-6.0/src/alias.c:491:49: [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). memmove((void *)(c + 1), (void *)(c + 3), strlen(c + 3) + 1); data/analog-6.0/src/alias.c:530:32: [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). memmove(name + 8, t + 26, strlen(t + 26) + 1); data/analog-6.0/src/alias.c:532:32: [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). memmove(name + 8, t + 25, strlen(t + 25) + 1); data/analog-6.0/src/alias.c:560: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). memmove(name + 8, name + 7, strlen(name + 7) + 1); data/analog-6.0/src/alias.c:561:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(name, "Netscape", 8); data/analog-6.0/src/alias.c:567: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). memmove(name + 7, name + 8, strlen(name + 8) + 1); data/analog-6.0/src/alias.c:638:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, tempp->h_name, BLOCKSIZE - 1); data/analog-6.0/src/alias.c:682:45: [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). lp->name = (char *)submalloc(xmemman, strlen(name) + 1); data/analog-6.0/src/alias.c:688:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lp->other = submalloc(xmemman, strlen(alias) + 1); data/analog-6.0/src/alias.c:693: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). lp->other = submalloc(xmemman, strlen(name) + 1); data/analog-6.0/src/alias.c:697: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). strlen(lp->name) + strlen(name) < 240) { data/analog-6.0/src/alias.c:697: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). strlen(lp->name) + strlen(name) < 240) { data/analog-6.0/src/alias.c:707:41: [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 (strchr(lp->name, ' ') == NULL && strlen(lp->name) < 240) { data/analog-6.0/src/alias.c:723:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lp->other = submalloc(xmemman, strlen(alias) + 1); data/analog-6.0/src/alias.c:746:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/analog-6.0/src/alias.c:751: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). tolen = strlen(to->string); data/analog-6.0/src/alias.c:767: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). memmove((void *)name, (void *)ans, strlen(ans) + 1); data/analog-6.0/src/alias.c:791:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len2 = strlen((char *)(mmv->curr_pos)); data/analog-6.0/src/alias.c:865: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). len = strlen((char *)(mms->curr_pos)); data/analog-6.0/src/alias.c:885: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). l = strlen(p->name); /* numerical host */ data/analog-6.0/src/alias.c:911:6: [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(p->name) < (l = strlen(s))) data/analog-6.0/src/alias.c:911:29: [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(p->name) < (l = strlen(s))) data/analog-6.0/src/anlghea3.h:287:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #undef getc data/analog-6.0/src/anlghea3.h:288:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define getc(file) mac_getc(file) data/analog-6.0/src/anlghea3.h:1136:57: [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 COPYSTR(s, n) {char *z = n; s = (char *)xmalloc(strlen(z) + 1); \ data/analog-6.0/src/anlghea3.h:1162:42: [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 PUTs(s, t, n) {int z; size_t l = strlen(t); \ data/analog-6.0/src/bzip2/bzlib.c:930:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Int32 c = fgetc ( f ); data/analog-6.0/src/bzip2/bzlib.c:1441:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(mode2,"b"); /* binary mode */ data/analog-6.0/src/globals.c:1272:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pathcp = (char *)xmalloc(strlen(path) + 1); data/analog-6.0/src/globals.c:1275: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). ENSURE_LEN(t, l, strlen(s) + strlen(commandname) + 2); data/analog-6.0/src/globals.c:1275:36: [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). ENSURE_LEN(t, l, strlen(s) + strlen(commandname) + 2); data/analog-6.0/src/globals.c:1286:55: [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). commandpath = (char *)xrealloc((void *)commandpath, strlen(commandpath) + 1); data/analog-6.0/src/init.c:829:49: [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). memmove((void *)(c + 1), (void *)(c + 2), strlen(c + 2) + 1); data/analog-6.0/src/init.c:886:45: [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 ALIASP(c, f, t) ENSURE_LEN(ss, len, strlen(t) + 7); \ data/analog-6.0/src/init.c:1107:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). od->plainampmlen = MAX(strlen(lngstr[am_]), strlen(lngstr[pm_])); data/analog-6.0/src/init.c:1107:51: [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). od->plainampmlen = MAX(strlen(lngstr[am_]), strlen(lngstr[pm_])); data/analog-6.0/src/init.c:1291:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). op->miscopts.dirsufflength = strlen(op->miscopts.dirsuffix); data/analog-6.0/src/init.c:1296: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). if (strlen(sp->name) > 0 && !ISDIGIT(*(sp->name)) && data/analog-6.0/src/init.c:1297: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). sp->name[strlen(sp->name) - 1] == '*') /* won't catch 3com.* */ data/analog-6.0/src/init.c:1625:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ENSURE_LEN(ans, len, strlen(ans) + 20); data/analog-6.0/src/init.c:1740: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). len = strlen(d); data/analog-6.0/src/init.c:1783:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(argv[i]) > 255) { data/analog-6.0/src/init2.c:324: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). memmove((void *)c, (void *)(c + 1), strlen(c)); data/analog-6.0/src/init2.c:327:49: [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). *args = (char *)xrealloc((void *)(*args), strlen(arg1) + strlen(*args)); data/analog-6.0/src/init2.c:327:64: [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). *args = (char *)xrealloc((void *)(*args), strlen(arg1) + strlen(*args)); data/analog-6.0/src/init2.c:668:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(arg1); data/analog-6.0/src/init2.c:838: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). dirlen = strlen(dirname); data/analog-6.0/src/init2.c:841: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). if (strlen(filep->d_name) > len) { data/analog-6.0/src/init2.c:842: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). len = strlen(filep->d_name); /* d_namlen is not portable */ data/analog-6.0/src/init2.c:885: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). dirlen = strlen(dirname); data/analog-6.0/src/init2.c:899: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). if (strlen(direntry.name) > len) { data/analog-6.0/src/init2.c:900: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). len = strlen(direntry.name); data/analog-6.0/src/init2.c:936: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). dirlen = strlen(dirname); data/analog-6.0/src/init2.c:938: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). if (strlen(file.name) > len) { data/analog-6.0/src/init2.c:939: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). len = strlen(file.name); data/analog-6.0/src/init2.c:970: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). length = strlen (lp->name); data/analog-6.0/src/init2.c:972:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( fspec, lp->name, length ); fspec[length] = '\0'; data/analog-6.0/src/init2.c:984:31: [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). related_dx.dsc$w_length = strlen(result); data/analog-6.0/src/init2.c:1014: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). s = (char *)xmalloc(strlen(arg1) + 1); data/analog-6.0/src/init2.c:1060:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lf->prefixlen = strlen(lf->prefix); data/analog-6.0/src/init2.c:1210: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). c = arg1 + strlen(arg1) - 1; data/analog-6.0/src/init2.c:1422:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ans->string = (char *)xmalloc(strlen(s) - 5); data/analog-6.0/src/init2.c:1442:29: [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). memmove(s + 1, s + 2, strlen(s + 1)); /* "$$"->"$" (reuse s) */ data/analog-6.0/src/init2.c:1649: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). arg1[strlen(arg1) - 1] == '/') data/analog-6.0/src/init2.c:1650: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). arg1[strlen(arg1) - 1] = '\0'; data/analog-6.0/src/input.c:57: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). len = strlen(lf->name); data/analog-6.0/src/input.c:110:29: [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). cmd = (char *)xmalloc(strlen(up->data) + strlen(lf->name) + 4); data/analog-6.0/src/input.c:110:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd = (char *)xmalloc(strlen(up->data) + strlen(lf->name) + 4); data/analog-6.0/src/input.c:169: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(lf->name); data/analog-6.0/src/input.c:469:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((*s = (char)getc(f)) == (char)EOF && feof(f)) /* in case char == 255 */ data/analog-6.0/src/input.c:472:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *s = (char)getc(f); /* run past any new line */ data/analog-6.0/src/input.c:475:23: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (*(++s) = (char)getc(f); *s != '\r' && *s != '\n' && !feof(f) && data/analog-6.0/src/input.c:476:52: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). s < start + BLOCKSIZE - used - 1; *(++s) = (char)getc(f)) data/analog-6.0/src/input.c:1198: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). t = s + strlen(arg); data/analog-6.0/src/input.c:1393:31: [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). ENSURE_LEN(fmt, fmtlen, strlen(fmt) + 12); data/analog-6.0/src/input.c:1396:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(fmt, "\t"); data/analog-6.0/src/input.c:1467:31: [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). ENSURE_LEN(fmt, fmtlen, strlen(fmt) + 11); /* See above */ data/analog-6.0/src/input.c:1545:31: [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). ENSURE_LEN(fmt, fmtlen, strlen(fmt) + 18); /* See above */ data/analog-6.0/src/input.c:1705: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). while ((l = strlen(block_start)) > 0 && *(block_start + l - 1) == '\\') { data/analog-6.0/src/input.c:1728:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(block_start) >= 255) data/analog-6.0/src/input.c:1746: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). if (strlen(block_start) >= 255) { data/analog-6.0/src/input.c:1773: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). else if (strlen(block_start) >= 250) { data/analog-6.0/src/input.c:1824: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). if (strlen(block_start) > 500) { data/analog-6.0/src/libgd/gd.c:239:6: [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). l = strlen((char *) s); data/analog-6.0/src/libgd/gd_io_file.c:107:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return getc(fctx->f); data/analog-6.0/src/libpng/pngconf.h:366: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). # define png_strlen strlen data/analog-6.0/src/macinput.c:290:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(refNum,c,2); data/analog-6.0/src/macinput.c:572:34: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (in_fp!=(gzFile)file) return(getc(file)); data/analog-6.0/src/macstuff.c:354: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). if (hostname[strlen(hostname)-1]=='.') hostname[strlen(hostname)-1]=0; data/analog-6.0/src/macstuff.c:354:55: [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 (hostname[strlen(hostname)-1]=='.') hostname[strlen(hostname)-1]=0; data/analog-6.0/src/macstuff.c:382: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). if (hostname[strlen(hostname)-1]=='.') hostname[strlen(hostname)-1]=0; data/analog-6.0/src/macstuff.c:382:55: [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 (hostname[strlen(hostname)-1]=='.') hostname[strlen(hostname)-1]=0; data/analog-6.0/src/outcro.c:179: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). return strlen(s); data/analog-6.0/src/outhtml.c:327: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). return(f?i:strlen(s)); data/analog-6.0/src/outhtml.c:441: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). width + strlen(colname) - od->outputter->strlength(colname), data/analog-6.0/src/outhtml.c:1060: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). need += strlen(pn->name); data/analog-6.0/src/outhtml.c:1111:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ENSURE_LEN(caption, len, strlen(lngstr[chartby_]) + data/analog-6.0/src/outhtml.c:1112: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(lngstr[method2sort[requests]]) + data/analog-6.0/src/outhtml.c:1113: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(lngstr[method2sort[requests7]]) + data/analog-6.0/src/outhtml.c:1114: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(lngstr[method2sort[chartby]]) + 3); data/analog-6.0/src/outhtml.c:1117:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(caption, " "); data/analog-6.0/src/outhtml.c:1124:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(caption, "."); data/analog-6.0/src/outhtml.c:1180: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 ((len = strlen(s)) <= MAXCHARS - 1) data/analog-6.0/src/outhtml.c:1183:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(t, s, (MAXCHARS - 3) / 2); data/analog-6.0/src/outhtml.c:1185:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(t + (MAXCHARS + 3) / 2, s + len - (MAXCHARS - 4) / 2, data/analog-6.0/src/outhtml.c:1334:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filename = (char *)xmalloc(strlen(od->localchartdir) + 13); data/analog-6.0/src/outlatex.c:286: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). return strlen(s); data/analog-6.0/src/outlatex.c:451:36: [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). matchlengthn(outf, od, width - strlen(name), ' '); data/analog-6.0/src/outlatex.c:459:29: [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). i = (int)width - (int)strlen(workspace) - (int)spaces; data/analog-6.0/src/outlatex.c:481:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). matchlengthn(outf, od, width - strlen(s), ' '); /* plain strlen: in \verb */ data/analog-6.0/src/outplain.c:256: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). return strlen(s); data/analog-6.0/src/outplain.c:385:36: [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). matchlengthn(outf, od, width - strlen(name), ' '); data/analog-6.0/src/outplain.c:392:29: [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). i = (int)width - (int)strlen(workspace) - (int)spaces; data/analog-6.0/src/outplain.c:414:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). matchlengthn(outf, od, width - strlen(s), ' '); data/analog-6.0/src/output.c:394: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). need += strlen(pn->name); data/analog-6.0/src/output.c:399: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). ISDIGIT(name[strlen(name) - 1])) data/analog-6.0/src/output.c:503:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). width[COL_TITLE] = MAX(strlen(p->name), /* no HTML codes used */ data/analog-6.0/src/output.c:544:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (!ISDIGIT(p->name[0]) || !ISDIGIT(p->name[strlen(p->name) - 1]))) data/analog-6.0/src/output2.c:90:16: [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). strlenp = &strlen; data/analog-6.0/src/output2.c:126:41: [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). plainampmlen + ((compsep == NULL)?0:strlen(compsep)) + 5; data/analog-6.0/src/output2.c:132:51: [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). ENSURE_LEN(ans, len, n * ((compsep == NULL)?0:strlen(compsep)) + 1); data/analog-6.0/src/output2.c:491:16: [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). !ISDIGIT(name[strlen(name) - 1])) { /* ignore left-aligned ones */ data/analog-6.0/src/output2.c:571: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). ENSURE_LEN(t, tlen, strlen(lngstr[firsts]) + strlen(gens) + 1); data/analog-6.0/src/output2.c:571:52: [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). ENSURE_LEN(t, tlen, strlen(lngstr[firsts]) + strlen(gens) + 1); data/analog-6.0/src/output2.c:578: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). ENSURE_LEN(t, tlen, strlen(lngstr[firstds]) + strlen(genp) + i + 1); data/analog-6.0/src/output2.c:578:53: [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). ENSURE_LEN(t, tlen, strlen(lngstr[firstds]) + strlen(genp) + i + 1); data/analog-6.0/src/output2.c:597: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). ENSURE_LEN(t, tlen, strlen(lngstr[alls]) + strlen(genp) + 1); data/analog-6.0/src/output2.c:597:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ENSURE_LEN(t, tlen, strlen(lngstr[alls]) + strlen(genp) + 1); data/analog-6.0/src/output2.c:757:4: [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(colname) + strlen(lngstr[byteprefixabbr_ + bm]) + data/analog-6.0/src/output2.c:757:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(colname) + strlen(lngstr[byteprefixabbr_ + bm]) + data/analog-6.0/src/output2.c:758:4: [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(d + 1) + 1); data/analog-6.0/src/outxhtml.c:401: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). return(f?i:strlen(s)); data/analog-6.0/src/outxml.c:354:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t xml_strlength(const char *s) { XML_TRACE(0); return strlen(s); } data/analog-6.0/src/outxml.c:516:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( *name=='[' && *(name+strlen(name)-1)==']' ) data/analog-6.0/src/outxml.c:519:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *(p+strlen(p)-1)=0; data/analog-6.0/src/outxml.c:543:51: [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). matchlengthn(outf, od, width - od->outputter->strlen(name), ' '); data/analog-6.0/src/outxml.c:555:44: [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). i = (int)width - (int)od->outputter->strlen(workspace) - (int)spaces; data/analog-6.0/src/outxml.c:604: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). if ( strlen(s) ) data/analog-6.0/src/outxml.c:821:36: [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). buffer=realloc(buffer, max(strlen(s)+1,1024)); data/analog-6.0/src/outxml.c:930: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). inlen=strlen(in); // input buffer length data/analog-6.0/src/outxml.c:960: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). if ( strlen(in)!=(outptr-out) ) data/analog-6.0/src/outxml.c:961:62: [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). fprintf( stderr, "%d chars in converted to %d chars out\n", strlen(in), outptr-out ); data/analog-6.0/src/process.c:165: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((char *)(amemman->curr_pos)); data/analog-6.0/src/tree.c:257: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). need += strlen(pn->name); data/analog-6.0/src/tree.c:363: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). ISDIGIT(pn->name[strlen(pn->name) - 1])) data/analog-6.0/src/tree.c:381:32: [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). ENSURE_LEN(name, len, need + strlen(p->name)); data/analog-6.0/src/tree.c:404:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(sp->name); data/analog-6.0/src/tree.c:412:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(sp->name); data/analog-6.0/src/tree.c:972:42: [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 (headmatch(c, al->data) && *(c + strlen(al->data)) == '=') { data/analog-6.0/src/tree.c:974: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). *name = c + strlen(al->data) + 1; data/analog-6.0/src/unzip/unzip.c:843:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) data/analog-6.0/src/utils.c:221: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). ans = (char *)xmalloc(strlen(name) + 1); data/analog-6.0/src/utils.c:227:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = strlen(sub); data/analog-6.0/src/utils.c:233: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). ans = (char *)xmalloc(t + u + strlen(name) + 2); data/analog-6.0/src/utils.c:235:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ans, old, u); data/analog-6.0/src/utils.c:355:16: [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). strlenp = &strlen; data/analog-6.0/src/utils.c:526:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/analog-6.0/src/utils.c:744:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return(pcre_exec((pcre *)p, NULL, s, (int)strlen(s), 0, 0, pmatch, data/analog-6.0/src/zlib/gzio.c:103:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s->path = (char*)ALLOC(strlen(path)+1); data/analog-6.0/src/zlib/gzio.c:537: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(buf); /* some *sprintf don't return the nb of bytes written */ data/analog-6.0/src/zlib/gzio.c:561: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(buf); /* old sprintf doesn't return the nb of bytes written */ data/analog-6.0/src/zlib/gzio.c:591:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return gzwrite(file, (char*)s, (unsigned)strlen(s)); data/analog-6.0/src/zlib/gzio.c:869: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). s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); data/analog-6.0/src/zlib/gzio.c:869:45: [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). s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); data/analog-6.0/src/zlib/infblock.c:213:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). z->total_out + (q >= s->read ? q - s->read : data/analog-6.0/src/zlib/infblock.c:213:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). z->total_out + (q >= s->read ? q - s->read : data/analog-6.0/src/zlib/infblock.c:214:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (s->end - s->read) + (q - s->window)))); data/analog-6.0/src/zlib/infblock.c:347:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). z->total_out + (q >= s->read ? q - s->read : data/analog-6.0/src/zlib/infblock.c:347:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). z->total_out + (q >= s->read ? q - s->read : data/analog-6.0/src/zlib/infblock.c:348:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (s->end - s->read) + (q - s->window)))); data/analog-6.0/src/zlib/infblock.c:357:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (s->read != s->write) data/analog-6.0/src/zlib/infcodes.c:227:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (s->read != s->write) data/analog-6.0/src/zlib/infutil.c:35:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). q = s->read; data/analog-6.0/src/zlib/infutil.h:56:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Bytef *read; /* window read pointer */ data/analog-6.0/src/zlib/infutil.h:78:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q) data/analog-6.0/src/zlib/infutil.h:80:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} ANALYSIS SUMMARY: Hits = 508 Lines analyzed = 57637 in approximately 1.77 seconds (32496 lines/second) Physical Source Lines of Code (SLOC) = 45328 Hits@level = [0] 640 [1] 194 [2] 222 [3] 3 [4] 89 [5] 0 Hits@level+ = [0+] 1148 [1+] 508 [2+] 314 [3+] 92 [4+] 89 [5+] 0 Hits/KSLOC@level+ = [0+] 25.3265 [1+] 11.2072 [2+] 6.92729 [3+] 2.02965 [4+] 1.96347 [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.