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/cxref-1.6e/ChangeLog.pre-1.6.cpp Examining data/cxref-1.6e/cpp/ansidecl.h Examining data/cxref-1.6e/cpp/cexp.c Examining data/cxref-1.6e/cpp/config.h Examining data/cxref-1.6e/cpp/gansidecl.h Examining data/cxref-1.6e/cpp/intl.h Examining data/cxref-1.6e/cpp/libiberty.h Examining data/cxref-1.6e/cpp/pcp.h Examining data/cxref-1.6e/cpp/prefix.h Examining data/cxref-1.6e/cpp/system.h Examining data/cxref-1.6e/cpp/version.c Examining data/cxref-1.6e/cpp/prefix.c Examining data/cxref-1.6e/cpp/cccp.c Examining data/cxref-1.6e/doc/README.c Examining data/cxref-1.6e/query/output.c Examining data/cxref-1.6e/query/query.c Examining data/cxref-1.6e/query/query.h Examining data/cxref-1.6e/query/input.c Examining data/cxref-1.6e/src/comment.c Examining data/cxref-1.6e/src/cxref.h Examining data/cxref-1.6e/src/datatype.h Examining data/cxref-1.6e/src/file.c Examining data/cxref-1.6e/src/func.c Examining data/cxref-1.6e/src/html.c Examining data/cxref-1.6e/src/memory.c Examining data/cxref-1.6e/src/memory.h Examining data/cxref-1.6e/src/parse-yy.h Examining data/cxref-1.6e/src/preproc.c Examining data/cxref-1.6e/src/rtf.c Examining data/cxref-1.6e/src/sgml.c Examining data/cxref-1.6e/src/slist.c Examining data/cxref-1.6e/src/type.c Examining data/cxref-1.6e/src/var.c Examining data/cxref-1.6e/src/version.h Examining data/cxref-1.6e/src/warn-raw.c Examining data/cxref-1.6e/src/latex.c Examining data/cxref-1.6e/src/cxref.c Examining data/cxref-1.6e/src/xref.c FINAL RESULTS: data/cxref-1.6e/cpp/cccp.c:2125: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 (p, q); data/cxref-1.6e/cpp/cccp.c:2153: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 (q, OBJECT_SUFFIX); data/cxref-1.6e/cpp/cccp.c:4300:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "\"%s\"", version_string); data/cxref-1.6e/cpp/cccp.c:4354:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "\"%s %2d %4d\"", monthnames[timebuf->tm_mon], data/cxref-1.6e/cpp/cccp.c:4538:6: [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 (dsp->fname, nam); data/cxref-1.6e/cpp/cccp.c:4681: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 (fname, fbeg); data/cxref-1.6e/cpp/cccp.c:4715: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 (fname, searchptr->fname); data/cxref-1.6e/cpp/cccp.c:4725: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 (fname, fbeg); data/cxref-1.6e/cpp/cccp.c:4733: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 (fname, fbeg); data/cxref-1.6e/cpp/cccp.c:4739: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 (fname, searchptr->fname); data/cxref-1.6e/cpp/cccp.c:4740:7: [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 (fname, fbeg); data/cxref-1.6e/cpp/cccp.c:4789:8: [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 (p, search_start->fname); data/cxref-1.6e/cpp/cccp.c:4790:8: [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 (p, fbeg); data/cxref-1.6e/cpp/cccp.c:4824:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (pcftry, "%s%d", fname, pcfnum++); data/cxref-1.6e/cpp/cccp.c:4853: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 (pcfname, pcftry); data/cxref-1.6e/cpp/cccp.c:5109: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 (name, dirname); data/cxref-1.6e/cpp/cccp.c:5110:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name, FILE_NAME_MAP_FILE); data/cxref-1.6e/cpp/cccp.c:5144:8: [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 (ptr->map_to, dirname); data/cxref-1.6e/cpp/cccp.c:5145:8: [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 (ptr->map_to, to); data/cxref-1.6e/cpp/cccp.c:7259:3: [4] (shell) execl: 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. execl ("/usr/games/hack", "#pragma", 0); data/cxref-1.6e/cpp/cccp.c:7260:3: [4] (shell) execl: 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. execl ("/usr/games/rogue", "#pragma", 0); data/cxref-1.6e/cpp/cccp.c:7261:3: [4] (shell) execl: 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. execl ("/usr/new/emacs", "-f", "hanoi", "9", "-kill", 0); data/cxref-1.6e/cpp/cccp.c:7262:3: [4] (shell) execl: 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. execl ("/usr/local/emacs", "-f", "hanoi", "9", "-kill", 0); data/cxref-1.6e/cpp/cccp.c:9420:3: [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 (stderr, _(msgid), args); data/cxref-1.6e/cpp/cccp.c:9639:5: [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, line ? ":%d: " : ": ", line); data/cxref-1.6e/cpp/cccp.c:10267:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (directive, " __BASE_FILE__ \"%s\"\n", data/cxref-1.6e/cpp/cccp.c:10299:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (directive, " __DATE__ \"%s %2d %4d\"\n", data/cxref-1.6e/cpp/cccp.c:10359: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 ((char *)buf, str); data/cxref-1.6e/cpp/cccp.c:10461: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 ((char *) buf, str); data/cxref-1.6e/cpp/cccp.c:10545: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 (dir->fname, prefix); data/cxref-1.6e/cpp/cccp.c:10546: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 (dir->fname, name); data/cxref-1.6e/cpp/cccp.c:11118: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 ((must_revert==1)?fullname:basename, Local); data/cxref-1.6e/cpp/cccp.c:11140: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 (basename, local_ptr); /* this gets rid of it */ data/cxref-1.6e/cpp/cexp.c:833:21: [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 YYFPRINTF fprintf data/cxref-1.6e/cpp/cexp.c:2829:3: [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 (stderr, _(msgid), args); data/cxref-1.6e/cpp/cexp.c:2849:3: [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 (stderr, _(msgid), args); data/cxref-1.6e/cpp/cexp.c:2869:3: [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 (stderr, _(msgid), args); data/cxref-1.6e/query/input.c:105:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s%c",filename,&ch)==2) data/cxref-1.6e/query/input.c:122:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",include,&ch)!=EOF); data/cxref-1.6e/query/input.c:158:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,funcname,&scope,&ch)==4) data/cxref-1.6e/query/input.c:195:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",called,&ch)!=EOF); data/cxref-1.6e/query/input.c:239:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,varname,&scope,&ch)==4) data/cxref-1.6e/query/input.c:262:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",funcname,&ch)!=EOF); data/cxref-1.6e/query/input.c:294:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s",filename,typename)==2) data/cxref-1.6e/src/comment.c:114:8: [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(malloc_comment,c); data/cxref-1.6e/src/comment.c:119:8: [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(malloc_comment,c); data/cxref-1.6e/src/comment.c:164:8: [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(malloc_comment,comment); data/cxref-1.6e/src/cxref.c:957:5: [4] (shell) execvp: 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. execvp(command[0],command); data/cxref-1.6e/src/cxref.h:196:5: [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. int fprintf(FILE*, const char*,...); data/cxref-1.6e/src/cxref.h:198:5: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. int fscanf( FILE *stream, const char *format, ...); data/cxref-1.6e/src/cxref.h:201:5: [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. int printf(const char*,...); data/cxref-1.6e/src/html.c:343:14: [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(of,--others?" %s(),":" %s()",html(file->f_refs->s1[i],0)); data/cxref-1.6e/src/html.c:384:14: [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(of,--others?" %s,":" %s",html(file->v_refs->s1[i],0)); data/cxref-1.6e/src/html.c:483:8: [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(of,i?", %s":"%s",html(def->args->s1[i],0)); data/cxref-1.6e/src/html.c:832:5: [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(of,i?", %s":"%s",html(func->args->s1[i],0)); data/cxref-1.6e/src/html.c:928:14: [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(of,--others?"%s(), ":"%s()",html(func->calls->s1[i],0)); data/cxref-1.6e/src/html.c:1012:14: [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(of,--others?"%s(), ":"%s()",html(func->f_refs->s1[i],0)); data/cxref-1.6e/src/html.c:1052:14: [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(of,--others?"%s, ":"%s",html(func->v_refs->s1[i],0)); data/cxref-1.6e/src/latex.c:324:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?"%s(), ":"%s()",latex(file->f_refs->s1[i],0)); data/cxref-1.6e/src/latex.c:350:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s,":" %s",latex(file->v_refs->s1[i],0)); data/cxref-1.6e/src/latex.c:438:8: [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(of,i?", %s":"%s",latex(def->args->s1[i],0)); data/cxref-1.6e/src/latex.c:684:5: [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(of,i?", %s":"%s",latex(func->args->s1[i],0)); data/cxref-1.6e/src/latex.c:747:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s(),":" %s()",latex(func->calls->s1[i],0)); data/cxref-1.6e/src/latex.c:800:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s(),":" %s()",latex(func->f_refs->s1[i],0)); data/cxref-1.6e/src/latex.c:826:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s,":" %s",latex(func->v_refs->s1[i],0)); data/cxref-1.6e/src/memory.c:246: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(t,x); data/cxref-1.6e/src/memory.c:268: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(t,x); data/cxref-1.6e/src/memory.c:333:11: [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(t,str); data/cxref-1.6e/src/rtf.c:293:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?"%s(), ":"%s()",rtf(file->f_refs->s1[i],0)); data/cxref-1.6e/src/rtf.c:315:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s,":" %s",rtf(file->v_refs->s1[i],0)); data/cxref-1.6e/src/rtf.c:398:8: [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(of,i?", %s":"%s",rtf(def->args->s1[i],0)); data/cxref-1.6e/src/rtf.c:619:5: [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(of,i?", %s":"%s",rtf(func->args->s1[i],0)); data/cxref-1.6e/src/rtf.c:672:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s(),":" %s()",rtf(func->calls->s1[i],0)); data/cxref-1.6e/src/rtf.c:717:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s(),":" %s()",rtf(func->f_refs->s1[i],0)); data/cxref-1.6e/src/rtf.c:739:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(of,--others?" %s,":" %s",rtf(func->v_refs->s1[i],0)); data/cxref-1.6e/src/sgml.c:290:14: [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(of,--others?" %s(),":" %s()",sgml(file->f_refs->s1[i],0)); data/cxref-1.6e/src/sgml.c:313:14: [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(of,--others?" %s,":" %s",sgml(file->v_refs->s1[i],0)); data/cxref-1.6e/src/sgml.c:401:8: [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(of,i?", %s":"%s",sgml(def->args->s1[i],0)); data/cxref-1.6e/src/sgml.c:638:5: [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(of,i?", %s":"%s",sgml(func->args->s1[i],0)); data/cxref-1.6e/src/sgml.c:700:14: [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(of,--others?"%s(), ":"%s()",sgml(func->calls->s1[i],0)); data/cxref-1.6e/src/sgml.c:744:14: [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(of,--others?"%s(), ":"%s()",sgml(func->f_refs->s1[i],0)); data/cxref-1.6e/src/sgml.c:767:14: [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(of,--others?"%s, ":"%s",sgml(func->v_refs->s1[i],0)); data/cxref-1.6e/src/warn-raw.c:229:11: [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(i?",%s":"%s",def->args->s1[i]); data/cxref-1.6e/src/xref.c:118:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s%c",filename,&ch)==2) data/cxref-1.6e/src/xref.c:127:16: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",include,&ch)!=EOF); data/cxref-1.6e/src/xref.c:220:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,funcname,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:234:16: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",called,&ch)!=EOF); data/cxref-1.6e/src/xref.c:298:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,varname,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:312:16: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",funcname,&ch)!=EOF); data/cxref-1.6e/src/xref.c:377:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s",filename,typename)==2) data/cxref-1.6e/src/xref.c:652:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s%c",filename,&ch)==2) data/cxref-1.6e/src/xref.c:656:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",include,&ch)!=EOF); data/cxref-1.6e/src/xref.c:674:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,caller,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:679:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",called,&ch)!=EOF); data/cxref-1.6e/src/xref.c:697:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,variable,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:702:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",funcname,&ch)!=EOF); data/cxref-1.6e/src/xref.c:719:14: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s",filename,typename)==2) data/cxref-1.6e/src/xref.c:765:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s%c",filename,&ch)==2) data/cxref-1.6e/src/xref.c:774:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",include,&ch)!=EOF); data/cxref-1.6e/src/xref.c:811:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,funcname,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:820:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",called,&ch)!=EOF); data/cxref-1.6e/src/xref.c:856:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s %d%c",filename,varname,&scope,&ch)==4) data/cxref-1.6e/src/xref.c:865:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. massert(fscanf(in,"%s%c",funcname,&ch)!=EOF); data/cxref-1.6e/src/xref.c:901:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while(fscanf(in,"%s %s",filename,typename)==2) data/cxref-1.6e/cpp/cccp.c:47:50: [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. #define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0) data/cxref-1.6e/cpp/cccp.c:1338:21: [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. literal_codeset = getenv ("LANG"); data/cxref-1.6e/cpp/cccp.c:2072:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && (getenv ("SUNPRO_DEPENDENCIES") != 0 data/cxref-1.6e/cpp/cccp.c:2073:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. || getenv ("DEPENDENCIES_OUTPUT") != 0)) { data/cxref-1.6e/cpp/cccp.c:2074:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *spec = getenv ("DEPENDENCIES_OUTPUT"); data/cxref-1.6e/cpp/cccp.c:2079:14: [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. spec = getenv ("SUNPRO_DEPENDENCIES"); data/cxref-1.6e/cpp/prefix.c:113:14: [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. prefix = getenv (temp = concat (key, "_ROOT", NULL_PTR)); data/cxref-1.6e/cpp/prefix.c:276:14: [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. prefix = getenv (key); data/cxref-1.6e/cpp/system.h:330:14: [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. extern char *getenv (); data/cxref-1.6e/cpp/system.h:334:14: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. extern char *getwd (); data/cxref-1.6e/cpp/cccp.c:76:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open(fname,mode,prot) VMS_open (fname,mode,prot) data/cxref-1.6e/cpp/cccp.c:77: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(fname,mode) VMS_fopen (fname,mode) data/cxref-1.6e/cpp/cccp.c:377:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[1]; data/cxref-1.6e/cpp/cccp.c:1479:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ? fopen (pcp_fname, "w") data/cxref-1.6e/cpp/cccp.c:1969:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) include_defaults_array, data/cxref-1.6e/cpp/cccp.c:2092:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (spec, output_file, s - spec); data/cxref-1.6e/cpp/cccp.c:2184:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((f = open (in_fname, O_RDONLY, 0666)) < 0) data/cxref-1.6e/cpp/cccp.c:2291:41: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (deps_file && ! (deps_stream = fopen (deps_file, deps_mode))) data/cxref-1.6e/cpp/cccp.c:2440:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) fptr, (char *) bptr, len); data/cxref-1.6e/cpp/cccp.c:2448:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) fptr, (char *) bptr, len); data/cxref-1.6e/cpp/cccp.c:2746:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) ibp, (char *) obp, ip->bufp - ibp); data/cxref-1.6e/cpp/cccp.c:2979:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ibp, obp, length); data/cxref-1.6e/cpp/cccp.c:3019:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) before_bp, (char *) obp, ibp - before_bp); data/cxref-1.6e/cpp/cccp.c:3072:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ("#pragma lint ", (char *) obp, 13); data/cxref-1.6e/cpp/cccp.c:3074:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (lintcmd, (char *) obp, cmdlen); data/cxref-1.6e/cpp/cccp.c:3079:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (argbp, (char *) obp, arglen); data/cxref-1.6e/cpp/cccp.c:3153:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) before_bp, (char *) obp, ibp - before_bp); data/cxref-1.6e/cpp/cccp.c:3525:11: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ibp, obp, length - 1); data/cxref-1.6e/cpp/cccp.c:3560:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ibp, obp, length - 1); data/cxref-1.6e/cpp/cccp.c:4041:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (kt->name, op->bufp, kt->length); data/cxref-1.6e/cpp/cccp.c:4047:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (buf, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:4181:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (kt->name, (char *) op->bufp, kt->length); data/cxref-1.6e/cpp/cccp.c:4194:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (yp, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:4199:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (buf, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:4295: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 (buf, "%d", true_indepth - 1); data/cxref-1.6e/cpp/cccp.c:4346: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 (buf, "%d", ip->lineno); data/cxref-1.6e/cpp/cccp.c:4357: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 (buf, "\"%02d:%02d:%02d\"", timebuf->tm_hour, timebuf->tm_min, data/cxref-1.6e/cpp/cccp.c:4413:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (buf, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:4723:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (fname, "[000000]"); data/cxref-1.6e/cpp/cccp.c:4736:6: [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 (fname, ".h"); data/cxref-1.6e/cpp/cccp.c:4826:10: [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). pcf = open (pcftry, O_RDONLY, 0666); data/cxref-1.6e/cpp/cccp.c:5111:7: [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). f = fopen (name, "r"); data/cxref-1.6e/cpp/cccp.c:5200:10: [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 (fname, O_RDONLY, 0); data/cxref-1.6e/cpp/cccp.c:5208: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 (fname, O_RDONLY, 0); data/cxref-1.6e/cpp/cccp.c:5288:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (filename, dir, from - filename); data/cxref-1.6e/cpp/cccp.c:5735: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 (line_directive, "\n# %d ", next_string->lineno); data/cxref-1.6e/cpp/cccp.c:5774:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (keyword->name, (char *) op->bufp, keyword_length); data/cxref-1.6e/cpp/cccp.c:5778:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) buf, (char *) op->bufp, limit - buf); data/cxref-1.6e/cpp/cccp.c:5956:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (temp->name, &defn->args.argnames[i], temp->length); data/cxref-1.6e/cpp/cccp.c:6396:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (p, exp_p, length); data/cxref-1.6e/cpp/cccp.c:6793:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) beg, (char *) temp->name, bp - beg); data/cxref-1.6e/cpp/cccp.c:6949:16: [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). new_lineno = atoi ((char *) bp) - 1; data/cxref-1.6e/cpp/cccp.c:7056:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (fname, hp->value.cpval, fname_length + 1); data/cxref-1.6e/cpp/cccp.c:7121:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) buf, (char *) copy, length); data/cxref-1.6e/cpp/cccp.c:7140:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) buf, (char *) copy, length); data/cxref-1.6e/cpp/cccp.c:7189:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ("#ident ", (char *) op->bufp, 7); data/cxref-1.6e/cpp/cccp.c:7191:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) buf, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:7254: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). if (open ("/dev/tty", O_RDONLY, 0666) != 0) data/cxref-1.6e/cpp/cccp.c:7257: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). if (open ("/dev/tty", O_WRONLY, 0666) != 1) data/cxref-1.6e/cpp/cccp.c:7468:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) buf, (char *) control_macro, end - buf); data/cxref-1.6e/cpp/cccp.c:7543:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ptr, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:7868:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) beg_of_group, (char *) op->bufp, data/cxref-1.6e/cpp/cccp.c:7873:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ptr, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:8098:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (bp, op->bufp, length - 1); data/cxref-1.6e/cpp/cccp.c:8153:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (bp, op->bufp, length); data/cxref-1.6e/cpp/cccp.c:8284:6: [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 (dst, "\\%03o", c); data/cxref-1.6e/cpp/cccp.c:8398:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (line_directive_buf, "# %d ", ip->lineno); data/cxref-1.6e/cpp/cccp.c:8422:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) line_directive_buf, (char *) op->bufp, len); data/cxref-1.6e/cpp/cccp.c:8707:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (arg->raw + i, xbuf + totlen, length); data/cxref-1.6e/cpp/cccp.c:8765:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) p1, (char *) (xbuf + totlen), l1 - p1); data/cxref-1.6e/cpp/cccp.c:8780:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) arg->expanded, (char *) (xbuf + totlen), data/cxref-1.6e/cpp/cccp.c:8902:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) ip->bufp, (char *) buffer, bufsize); data/cxref-1.6e/cpp/cccp.c:8923:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy ((char *) ip->bufp, (char *) (buffer + bufsize - (bp - ip->bufp)), data/cxref-1.6e/cpp/cccp.c:9271:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ibp, obp, length); data/cxref-1.6e/cpp/cccp.c:9346:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (ibp, obp, length); data/cxref-1.6e/cpp/cccp.c:10262:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directive[2048]; data/cxref-1.6e/cpp/cccp.c:10306: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 (directive, " __TIME__ \"%02d:%02d:%02d\"\n", data/cxref-1.6e/cpp/cccp.c:10314:11: [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 (directive, " __STDC__ 1"); data/cxref-1.6e/cpp/cccp.c:10321:11: [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 (directive, " __OBJC__ 1"); data/cxref-1.6e/cpp/cccp.c:10360: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 ((char *)buf, " 1"); data/cxref-1.6e/cpp/cccp.c:10727:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (" \\\n ", &deps_buffer[deps_size], 4); data/cxref-1.6e/cpp/cccp.c:10860: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 (output, input, len); data/cxref-1.6e/cpp/cccp.c:10895: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 Local[512]; data/cxref-1.6e/cpp/cccp.c:10941: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 (basename, ".h"); data/cxref-1.6e/cpp/cccp.c:11047: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 (local_ptr, "000000]"); data/cxref-1.6e/cpp/cccp.c:11127: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). f = open (fullname, O_RDONLY, 0666); data/cxref-1.6e/cpp/cccp.c:11176:8: [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). #undef fopen /* Get back the real fopen routine. */ data/cxref-1.6e/cpp/cccp.c:11180:43: [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 *(*vmslib_fopen)() = (FILE *(*)()) fopen; data/cxref-1.6e/cpp/cccp.c:11195:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #undef open /* Get back the real open routine. */ data/cxref-1.6e/cpp/cccp.c:11196:10: [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). return open (fname, flags, prot, "mbc=16", "deq=64", "fop=tef"); data/cxref-1.6e/cpp/cccp.c:11229:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nambuf[NAM$C_MAXRSS+1]; data/cxref-1.6e/cpp/cccp.c:11250:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exp_nam[NAM$C_MAXRSS+1], /* expanded name buffer for SYS$PARSE */ data/cxref-1.6e/cpp/cexp.c:1133:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/cxref-1.6e/cpp/cexp.c:1150:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yyformat[sizeof yyunexpected data/cxref-1.6e/cpp/cexp.c:1340: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 yymsgbuf[128]; data/cxref-1.6e/cpp/cexp.c:2725: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 buf[1024]; data/cxref-1.6e/cpp/cexp.c:2773: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. unsigned char is_idchar[256]; data/cxref-1.6e/cpp/cexp.c:2775: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. unsigned char is_idstart[256]; data/cxref-1.6e/cpp/cexp.c:2777: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. unsigned char is_space[256]; data/cxref-1.6e/cpp/prefix.c:189:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy (s, result, len); data/cxref-1.6e/cpp/system.h:263:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifndef bcopy data/cxref-1.6e/cpp/system.h:266:13: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. extern void bcopy (); data/cxref-1.6e/cpp/system.h:269:11: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define bcopy(src,dst,len) memmove((dst),(src),(len)) data/cxref-1.6e/cpp/system.h:318:13: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). extern long atol(); data/cxref-1.6e/query/input.c:96: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 include[FILE_MAX_LEN],filename[FILE_MAX_LEN+1],ch; data/cxref-1.6e/query/input.c:100: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 =fopen(ifile,"r"); data/cxref-1.6e/query/input.c:148: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 ch,funcname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],called[FUNC_MAX_LEN+1]; data/cxref-1.6e/query/input.c:153: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 =fopen(ifile,"r"); data/cxref-1.6e/query/input.c:229: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 varname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],funcname[FUNC_MAX_LEN+1],ch; data/cxref-1.6e/query/input.c:234: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 =fopen(ifile,"r"); data/cxref-1.6e/query/input.c:285: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 typename[FILE_MAX_LEN+1],filename[FILE_MAX_LEN+1],typetype[TYPE_MAX_LEN+1]; data/cxref-1.6e/query/input.c:289: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 =fopen(ifile,"r"); data/cxref-1.6e/query/query.c:138: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. char input[128]; data/cxref-1.6e/src/cxref.c:113: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 here[PATH_MAX+1],there[PATH_MAX+1]; data/cxref-1.6e/src/cxref.c:455:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *file=fopen(CXREF_CONFIG_FILE,"r"); data/cxref-1.6e/src/cxref.c:458: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 data[257]; data/cxref-1.6e/src/html.c:106:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:121:8: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:1074: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 line[256]; data/cxref-1.6e/src/html.c:1087:5: [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=fopen(ifile,"r"); data/cxref-1.6e/src/html.c:1090: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 =fopen(ifile,"w"); data/cxref-1.6e/src/html.c:1098: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 =fopen(ifile,"r"); data/cxref-1.6e/src/html.c:1101: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:1152: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* file=fopen(fname,"w"); data/cxref-1.6e/src/html.c:1256:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:1356: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 line[256]; data/cxref-1.6e/src/html.c:1367: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/html.c:1368: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:1412: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 line[256]; data/cxref-1.6e/src/html.c:1415: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 pad[5]; data/cxref-1.6e/src/html.c:1420: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/html.c:1424: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/html.c:1431: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(pad," "); data/cxref-1.6e/src/html.c:1469: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. static char safe[4][256],*malloced[4]={NULL,NULL,NULL,NULL}; data/cxref-1.6e/src/html.c:1502:17: [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(&ret[j],"<");j+=4; data/cxref-1.6e/src/html.c:1505:17: [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(&ret[j],">");j+=4; data/cxref-1.6e/src/html.c:1508:17: [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(&ret[j],"&");j+=5; data/cxref-1.6e/src/html.c:1513:20: [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(&ret[j],"<br>");j+=4; data/cxref-1.6e/src/latex.c:101:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/latex.c:116:8: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/latex.c:847: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 line[256]; data/cxref-1.6e/src/latex.c:855: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/latex.c:859: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 =fopen(ifile,"r"); data/cxref-1.6e/src/latex.c:862: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/latex.c:922:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). template=fopen(name,"w"); data/cxref-1.6e/src/latex.c:959: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* file=fopen(fname,"w"); data/cxref-1.6e/src/latex.c:969: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* file=fopen(fname,"w"); data/cxref-1.6e/src/latex.c:979: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* file=fopen(fname,"w"); data/cxref-1.6e/src/latex.c:1015:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/latex.c:1122: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 line[256]; data/cxref-1.6e/src/latex.c:1133: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/latex.c:1134: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/latex.c:1183: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. static char safe[4][256],*malloced[4]={NULL,NULL,NULL,NULL}; data/cxref-1.6e/src/latex.c:1221:17: [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(&ret[j],"$\\backslash$");j+=12; data/cxref-1.6e/src/latex.c:1224:17: [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(&ret[j],"$\\sim$");j+=6; data/cxref-1.6e/src/latex.c:1227:17: [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(&ret[j],"$\\wedge$");j+=8; data/cxref-1.6e/src/rtf.c:94:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/rtf.c:109:8: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/rtf.c:771:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/rtf.c:930: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. static char safe[4][256],*malloced[4]={NULL,NULL,NULL,NULL}; data/cxref-1.6e/src/sgml.c:91:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/sgml.c:106:8: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/sgml.c:847:5: [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). of=fopen(ofile,"w"); data/cxref-1.6e/src/sgml.c:948: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. static char safe[4][256],*malloced[4]={NULL,NULL,NULL,NULL}; data/cxref-1.6e/src/sgml.c:978:17: [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(&ret[j],"&ero;");j+=5; data/cxref-1.6e/src/sgml.c:982:20: [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(&ret[j],"&etago;");j+=7; break;} data/cxref-1.6e/src/sgml.c:991:20: [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(&ret[j],"&etago;");j+=7;} data/cxref-1.6e/src/sgml.c:993:20: [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(&ret[j],"<");j+=4;} data/cxref-1.6e/src/sgml.c:996:17: [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(&ret[j],">");j+=4; data/cxref-1.6e/src/sgml.c:999:17: [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(&ret[j],""");j+=6; data/cxref-1.6e/src/sgml.c:1002:17: [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(&ret[j],"&");j+=5; data/cxref-1.6e/src/sgml.c:1005:17: [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(&ret[j],"$");j+=8; data/cxref-1.6e/src/sgml.c:1008:17: [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(&ret[j],"#");j+=5; data/cxref-1.6e/src/sgml.c:1011:17: [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(&ret[j],"%");j+=8; data/cxref-1.6e/src/sgml.c:1014:17: [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(&ret[j],"˜");j+=7; data/cxref-1.6e/src/sgml.c:1019:20: [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(&ret[j],"<newline>");j+=9; data/cxref-1.6e/src/xref.c:103: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:104: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:116: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. char include[FILE_MAX_LEN+1],filename[FILE_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:162: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:163: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:217: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. char ch,funcname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],called[FUNC_MAX_LEN+1]; data/cxref-1.6e/src/xref.c:275: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:276: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:295: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. char varname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],funcname[FUNC_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:361: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:362: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:375: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. char typename[TYPE_MAX_LEN+1],filename[FILE_MAX_LEN+1]; data/cxref-1.6e/src/xref.c:646: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:650: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. char include[FILE_MAX_LEN+1],filename[FILE_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:667: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:671: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. char ch,caller[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],called[FUNC_MAX_LEN+1]; data/cxref-1.6e/src/xref.c:690: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:694: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. char variable[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],funcname[FUNC_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:713: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 =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:717: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. char typename[TYPE_MAX_LEN],filename[FILE_MAX_LEN+1]; data/cxref-1.6e/src/xref.c:756: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:757: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:763: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 include[FILE_MAX_LEN+1],filename[FILE_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:801: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:802: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:808: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 ch,funcname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],called[FUNC_MAX_LEN+1]; data/cxref-1.6e/src/xref.c:846: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:847: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:853: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 varname[FUNC_MAX_LEN+1],filename[FILE_MAX_LEN+1],funcname[FUNC_MAX_LEN+1],ch; data/cxref-1.6e/src/xref.c:892: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). in =fopen(ifile,"r"); data/cxref-1.6e/src/xref.c:893: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). out=fopen(ofile,"w"); data/cxref-1.6e/src/xref.c:899: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 typename[TYPE_MAX_LEN+1],filename[FILE_MAX_LEN+1]; data/cxref-1.6e/cpp/cccp.c:1066:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nchars = read (desc, ptr, rcount); data/cxref-1.6e/cpp/cccp.c:1143: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). length -= (segment_length = strlen(string)); data/cxref-1.6e/cpp/cccp.c:1408: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). if (!strcmp (prefix + strlen (prefix) - 8, "/include")) data/cxref-1.6e/cpp/cccp.c:1409: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). prefix[strlen (prefix) - 7] = 0; data/cxref-1.6e/cpp/cccp.c:1433: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). if (!strcmp (prefix + strlen (prefix) - 8, "/include")) data/cxref-1.6e/cpp/cccp.c:1434: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). prefix[strlen (prefix) - 7] = 0; data/cxref-1.6e/cpp/cccp.c:1810: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). fp->nominal_fname_len = strlen (in_fname); data/cxref-1.6e/cpp/cccp.c:1986: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). if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) { data/cxref-1.6e/cpp/cccp.c:1987: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). default_len = strlen (default_prefix) - 7; data/cxref-1.6e/cpp/cccp.c:2047: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). fprintf (stderr, " %.*s\n", (int) strlen (p->fname) - 1, p->fname); data/cxref-1.6e/cpp/cccp.c:2124: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). p = (char *) alloca (strlen(q) + 8); data/cxref-1.6e/cpp/cccp.c:2128: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 (p); data/cxref-1.6e/cpp/cccp.c:2190: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). fp->nominal_fname_len = strlen (in_fname); data/cxref-1.6e/cpp/cccp.c:2370:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen (p); data/cxref-1.6e/cpp/cccp.c:4299: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). buf = (char *) alloca (3 + strlen (version_string)); data/cxref-1.6e/cpp/cccp.c:4411: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 (buf); data/cxref-1.6e/cpp/cccp.c:4716: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). if (fname[strlen (fname) - 1] == ':') data/cxref-1.6e/cpp/cccp.c:4751: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). p->fname = fname + strlen (searchptr->fname); data/cxref-1.6e/cpp/cccp.c:4787: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). char *p = (char *) alloca (strlen (search_start->fname) data/cxref-1.6e/cpp/cccp.c:4788: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). + strlen (fbeg) + 1); data/cxref-1.6e/cpp/cccp.c:4817: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). pcftry = (char *) alloca (strlen (fname) + 30); data/cxref-1.6e/cpp/cccp.c:4852: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). pcfname = xmalloc (strlen (pcftry) + 1); data/cxref-1.6e/cpp/cccp.c:4884: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). if (! strncmp (searchptr->fname, filename, strlen (searchptr->fname))) data/cxref-1.6e/cpp/cccp.c:5059:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc (f)) != EOF && ! is_space[ch]) data/cxref-1.6e/cpp/cccp.c:5107: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/cxref-1.6e/cpp/cccp.c:5108: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). name = (char *) alloca (dirlen + strlen (FILE_NAME_MAP_FILE) + 1); data/cxref-1.6e/cpp/cccp.c:5118:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc (f)) != EOF) data/cxref-1.6e/cpp/cccp.c:5127:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc (f)) != EOF && is_hor_space[ch]) data/cxref-1.6e/cpp/cccp.c:5152:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = getc (f)) != '\n') data/cxref-1.6e/cpp/cccp.c:5189: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 (fname), data/cxref-1.6e/cpp/cccp.c:5272: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). from = filename + strlen (searchptr->fname); data/cxref-1.6e/cpp/cccp.c:5349: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). fp->nominal_fname_len = strlen (fname); data/cxref-1.6e/cpp/cccp.c:5660: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). endofthiskey = cp + strlen ((char *) cp); data/cxref-1.6e/cpp/cccp.c:5731: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). len = 4 * strlen ((char *) next_string->filename) + 32; data/cxref-1.6e/cpp/cccp.c:5736:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy (quote_string (line_directive + strlen (line_directive), data/cxref-1.6e/cpp/cccp.c:5736: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). strcpy (quote_string (line_directive + strlen (line_directive), data/cxref-1.6e/cpp/cccp.c:5738: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). strlen ((char *) next_string->filename)), data/cxref-1.6e/cpp/cccp.c:5740: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). safe_write (fileno (stdout), line_directive, strlen (line_directive)); data/cxref-1.6e/cpp/cccp.c:7535: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). int len = strlen (ptr); data/cxref-1.6e/cpp/cccp.c:7860: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). int len = strlen (ptr); data/cxref-1.6e/cpp/cccp.c:8399: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). line_end = quote_string (line_directive_buf + strlen (line_directive_buf), data/cxref-1.6e/cpp/cccp.c:10270: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). pass_thru_directive (udirective, &udirective[strlen (directive)], data/cxref-1.6e/cpp/cccp.c:10303: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). pass_thru_directive (udirective, &udirective[strlen (directive)], data/cxref-1.6e/cpp/cccp.c:10309: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). pass_thru_directive (udirective, &udirective[strlen (directive)], data/cxref-1.6e/cpp/cccp.c:10316:56: [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). pass_thru_directive (udirective, &udirective[strlen (directive)], data/cxref-1.6e/cpp/cccp.c:10323:56: [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). pass_thru_directive (udirective, &udirective[strlen (directive)], data/cxref-1.6e/cpp/cccp.c:10367: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). buf = (U_CHAR *) alloca (2 * strlen (str) + 1); data/cxref-1.6e/cpp/cccp.c:10368:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((char *) buf, str, p - (U_CHAR *) str); data/cxref-1.6e/cpp/cccp.c:10377: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). U_CHAR *p1 = skip_quoted_string (p, p + strlen ((char *) p), 0, data/cxref-1.6e/cpp/cccp.c:10400: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). ip->nominal_fname_len = strlen (ip->nominal_fname); data/cxref-1.6e/cpp/cccp.c:10403: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). ip->length = strlen ((char *) buf); data/cxref-1.6e/cpp/cccp.c:10414: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). do_define (buf, buf + strlen ((char *) buf), NULL_PTR, kt); data/cxref-1.6e/cpp/cccp.c:10430: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). ip->nominal_fname_len = strlen (ip->nominal_fname); data/cxref-1.6e/cpp/cccp.c:10433: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). ip->length = strlen (str); data/cxref-1.6e/cpp/cccp.c:10443: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). do_undef ((U_CHAR *) str, (U_CHAR *) str + strlen (str), op, kt); data/cxref-1.6e/cpp/cccp.c:10460: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). buf = (U_CHAR *) alloca (strlen (str) + 2); /* Change to handle gcc 3.x "-Afoo=bar" - AMB */ data/cxref-1.6e/cpp/cccp.c:10489:6: [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((char*)p,")"); data/cxref-1.6e/cpp/cccp.c:10495: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). ip->nominal_fname_len = strlen (ip->nominal_fname); data/cxref-1.6e/cpp/cccp.c:10498: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). ip->length = strlen ((char *) buf); data/cxref-1.6e/cpp/cccp.c:10510: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). do_assert (buf, buf + strlen ((char *) buf) , NULL_PTR, kt); data/cxref-1.6e/cpp/cccp.c:10543: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 (prefix) + strlen (name) + 2)); data/cxref-1.6e/cpp/cccp.c:10543: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). + strlen (prefix) + strlen (name) + 2)); data/cxref-1.6e/cpp/cccp.c:10636: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). int len = strlen (dir->fname) + INCLUDE_LEN_FUDGE; data/cxref-1.6e/cpp/cccp.c:10858: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). register size_t len = strlen (input) + 1; data/cxref-1.6e/cpp/cccp.c:11048: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). local_ptr += strlen (local_ptr); data/cxref-1.6e/cpp/cccp.c:11255:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fab.fab$b_fns = (unsigned char) strlen (name); data/cxref-1.6e/cpp/cexp.c:1014: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). # define yystrlen strlen data/cxref-1.6e/cpp/cexp.c:2739:26: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((buf[n] = c = getchar ()) != '\n' && c != EOF) data/cxref-1.6e/cpp/prefix.c:152: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). length += strlen (arg); data/cxref-1.6e/cpp/prefix.c:264:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (key, &name[1], keylen); data/cxref-1.6e/cpp/prefix.c:282: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). if (IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1])) data/cxref-1.6e/cpp/prefix.c:284: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). char * temp = save_string (prefix, strlen (prefix)); data/cxref-1.6e/cpp/prefix.c:285: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). temp[strlen (temp) - 1] = 0; data/cxref-1.6e/cpp/prefix.c:299: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). if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0) data/cxref-1.6e/cpp/prefix.c:304: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). path = concat (key, &path[strlen (std_prefix)], NULL_PTR); data/cxref-1.6e/cpp/prefix.c:315:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (path); data/cxref-1.6e/cpp/prefix.c:328:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (path); data/cxref-1.6e/query/input.c:299: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). typetype[strlen(typetype)-1]=0; data/cxref-1.6e/query/query.c:144: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). input[strlen(input)-1]=0; data/cxref-1.6e/src/comment.c:113: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). malloc_comment=Malloc(strlen(c)+1); data/cxref-1.6e/src/comment.c:118: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). malloc_comment=Realloc(malloc_comment,strlen(c)+strlen(malloc_comment)+1); data/cxref-1.6e/src/comment.c:118:56: [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). malloc_comment=Realloc(malloc_comment,strlen(c)+strlen(malloc_comment)+1); data/cxref-1.6e/src/comment.c:163: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). malloc_comment=Realloc(malloc_comment,strlen(comment)+1); data/cxref-1.6e/src/comment.c:195: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). int l=strlen(name); data/cxref-1.6e/src/comment.c:301: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). str=*string+strlen(*string)-1; data/cxref-1.6e/src/cxref.c:177: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). else if(!strncmp(here,there,strlen(here))) data/cxref-1.6e/src/cxref.c:178: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). root_prefix=there+strlen(here)+1; data/cxref-1.6e/src/cxref.c:197:74: [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(cpp_command[i][0]=='/' && !strncmp(cpp_command[i],here,strlen(here))) data/cxref-1.6e/src/cxref.c:198: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). cpp_command[i]=MallocString(cpp_command[i]+strlen(here)+1); data/cxref-1.6e/src/cxref.c:212:78: [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(cpp_command[i][2]=='/' && !strncmp(&cpp_command[i][2],here,strlen(here))) data/cxref-1.6e/src/cxref.c:213:80: [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). cpp_command[i]=MallocString(ConcatStrings(2,"-I",cpp_command[i]+2+strlen(here)+1)); data/cxref-1.6e/src/cxref.c:228: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). option_incdirs[i]=MallocString(option_incdirs[i]+strlen(here)+1); data/cxref-1.6e/src/cxref.c:229:72: [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(*option_incdirs[i]=='/' && !strncmp(option_incdirs[i],here,strlen(here))) data/cxref-1.6e/src/cxref.c:230: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). option_incdirs[i]=MallocString(option_incdirs[i]+strlen(here)+1); data/cxref-1.6e/src/cxref.c:464: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). char *d=data+strlen(data)-1; data/cxref-1.6e/src/cxref.c:843: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). match=&name[strlen(name)-2]; data/cxref-1.6e/src/cxref.c:847: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). match=&name[strlen(name)-3]; data/cxref-1.6e/src/cxref.c:859: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). match=&name[strlen(name)-1]; data/cxref-1.6e/src/html.c:110: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). int i,ofl=strlen(ofile); data/cxref-1.6e/src/html.c:112: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). for(i=strlen(option_odir)+1;i<ofl;i++) data/cxref-1.6e/src/html.c:127:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(goback="",i=strlen(file->name);i>0;i--) data/cxref-1.6e/src/html.c:1109:61: [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). (!strncmp("<!--",line,4) && !strncmp(inc_file,line+4,strlen(inc_file))) || data/cxref-1.6e/src/html.c:1110: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). (!strncmp("<!-- ",line,5) && !strncmp(inc_file,line+5,strlen(inc_file)))) data/cxref-1.6e/src/html.c:1377: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). (!strncmp("<!--",line,4) && !strncmp(inc_file,line+4,strlen(inc_file)-1)) || data/cxref-1.6e/src/html.c:1378:65: [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). (!strncmp("<!-- ",line,5) && !strncmp(inc_file,line+5,strlen(inc_file)-1))) data/cxref-1.6e/src/html.c:1530:53: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). {malloced[which]=Malloc(len+delta+256); strncpy(malloced[which],ret,(unsigned)j);} data/cxref-1.6e/src/latex.c:105: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). int i,ofl=strlen(ofile); data/cxref-1.6e/src/latex.c:107: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). for(i=strlen(option_odir)+1;i<ofl;i++) data/cxref-1.6e/src/latex.c:1251:53: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). {malloced[which]=Malloc(len+delta+256); strncpy(malloced[which],ret,(unsigned)j);} data/cxref-1.6e/src/memory.c:245: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). t=(char*)SafeMalloc(strlen(x)+1,file,line); data/cxref-1.6e/src/memory.c:267: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). t=get_space(strlen(x)+1); data/cxref-1.6e/src/memory.c:310: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). l+=strlen(str); data/cxref-1.6e/src/preproc.c:89: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). name[strlen(name)-1]=0; data/cxref-1.6e/src/preproc.c:195:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(!strncmp(name,cwd,strlen(cwd))) data/cxref-1.6e/src/preproc.c:196: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). name=name+strlen(cwd); data/cxref-1.6e/src/rtf.c:98: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). int i,ofl=strlen(ofile); data/cxref-1.6e/src/rtf.c:100: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). for(i=strlen(option_odir)+1;i<ofl;i++) data/cxref-1.6e/src/rtf.c:991:53: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). {malloced[which]=Malloc(len+delta+256); strncpy(malloced[which],ret,(unsigned)j);} data/cxref-1.6e/src/sgml.c:95: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). int i,ofl=strlen(ofile); data/cxref-1.6e/src/sgml.c:97: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). for(i=strlen(option_odir)+1;i<ofl;i++) data/cxref-1.6e/src/sgml.c:112:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(goback="",i=strlen(file->name);i>0;i--) data/cxref-1.6e/src/sgml.c:1035:53: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). {malloced[which]=Malloc(len+delta+256); strncpy(malloced[which],ret,(unsigned)j);} data/cxref-1.6e/src/type.c:199:58: [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(xref->type && !strncmp(cur_su->name,xref->type,strlen(cur_su->name))) data/cxref-1.6e/src/type.c:250: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). if(!strncmp(xref->name,typdef->type,strlen(xref->name))) data/cxref-1.6e/src/warn-raw.c:124: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). int len=strlen(file->name)-2; data/cxref-1.6e/src/xref.c:724: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). typename[strlen(typename)-1]=0; ANALYSIS SUMMARY: Hits = 438 Lines analyzed = 27781 in approximately 0.98 seconds (28354 lines/second) Physical Source Lines of Code (SLOC) = 18748 Hits@level = [0] 1240 [1] 126 [2] 198 [3] 10 [4] 104 [5] 0 Hits@level+ = [0+] 1678 [1+] 438 [2+] 312 [3+] 114 [4+] 104 [5+] 0 Hits/KSLOC@level+ = [0+] 89.5029 [1+] 23.3625 [2+] 16.6418 [3+] 6.08065 [4+] 5.54726 [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.