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/lie-2.2.2+dfsg/ansi.h Examining data/lie-2.2.2+dfsg/bigint.c Examining data/lie-2.2.2+dfsg/binmat.c Examining data/lie-2.2.2+dfsg/creatop.c Examining data/lie-2.2.2+dfsg/date.c Examining data/lie-2.2.2+dfsg/getl.c Examining data/lie-2.2.2+dfsg/getl.h Examining data/lie-2.2.2+dfsg/infolrn.h Examining data/lie-2.2.2+dfsg/learn.c Examining data/lie-2.2.2+dfsg/output.c Examining data/lie-2.2.2+dfsg/poly.c Examining data/lie-2.2.2+dfsg/static/static1.c Examining data/lie-2.2.2+dfsg/static/static2.c Examining data/lie-2.2.2+dfsg/static/static4.c Examining data/lie-2.2.2+dfsg/static/static5.c Examining data/lie-2.2.2+dfsg/static/static6.c Examining data/lie-2.2.2+dfsg/static/static7.c Examining data/lie-2.2.2+dfsg/util/infoind.c Examining data/lie-2.2.2+dfsg/util/learnind.c Examining data/lie-2.2.2+dfsg/box/altdom.c Examining data/lie-2.2.2+dfsg/box/branch.c Examining data/lie-2.2.2+dfsg/box/centr.c Examining data/lie-2.2.2+dfsg/box/contragr.c Examining data/lie-2.2.2+dfsg/box/defs.c Examining data/lie-2.2.2+dfsg/box/diagram.c Examining data/lie-2.2.2+dfsg/box/matrix.c Examining data/lie-2.2.2+dfsg/box/orbit.c Examining data/lie-2.2.2+dfsg/box/defs.h Examining data/lie-2.2.2+dfsg/box/static3.c Examining data/lie-2.2.2+dfsg/box/decomp.c Examining data/lie-2.2.2+dfsg/box/closure.c Examining data/lie-2.2.2+dfsg/box/coxeter.c Examining data/lie-2.2.2+dfsg/box/coxeter.h Examining data/lie-2.2.2+dfsg/box/decomp.h Examining data/lie-2.2.2+dfsg/box/domchar.c Examining data/lie-2.2.2+dfsg/box/domchar.h Examining data/lie-2.2.2+dfsg/box/factor.c Examining data/lie-2.2.2+dfsg/box/grpdata.c Examining data/lie-2.2.2+dfsg/box/grpdata.h Examining data/lie-2.2.2+dfsg/box/lr.c Examining data/lie-2.2.2+dfsg/box/plethysm.c Examining data/lie-2.2.2+dfsg/box/plethysm.h Examining data/lie-2.2.2+dfsg/box/sorting.c Examining data/lie-2.2.2+dfsg/box/symg.c Examining data/lie-2.2.2+dfsg/box/symg.h Examining data/lie-2.2.2+dfsg/box/tensor.c Examining data/lie-2.2.2+dfsg/box/tensor.h Examining data/lie-2.2.2+dfsg/box/weylloop.c Examining data/lie-2.2.2+dfsg/box/weylloop.h Examining data/lie-2.2.2+dfsg/box/weylorbit.c Examining data/lie-2.2.2+dfsg/box/weyl.c Examining data/lie-2.2.2+dfsg/gettype.c Examining data/lie-2.2.2+dfsg/gettype.h Examining data/lie-2.2.2+dfsg/getvalue.c Examining data/lie-2.2.2+dfsg/getvalue.h Examining data/lie-2.2.2+dfsg/init.c Examining data/lie-2.2.2+dfsg/init.h Examining data/lie-2.2.2+dfsg/lexer.c Examining data/lie-2.2.2+dfsg/lexer.h Examining data/lie-2.2.2+dfsg/non-ANSI.c Examining data/lie-2.2.2+dfsg/main.c Examining data/lie-2.2.2+dfsg/main.h Examining data/lie-2.2.2+dfsg/mem.c Examining data/lie-2.2.2+dfsg/memtype.h Examining data/lie-2.2.2+dfsg/mem.h Examining data/lie-2.2.2+dfsg/node.c Examining data/lie-2.2.2+dfsg/nodetype.h Examining data/lie-2.2.2+dfsg/node.h Examining data/lie-2.2.2+dfsg/onoff.c Examining data/lie-2.2.2+dfsg/onoff.h Examining data/lie-2.2.2+dfsg/parseaux.c Examining data/lie-2.2.2+dfsg/print.c Examining data/lie-2.2.2+dfsg/sym.c Examining data/lie-2.2.2+dfsg/sym.h Examining data/lie-2.2.2+dfsg/gapprint.c Examining data/lie-2.2.2+dfsg/sysdept.h Examining data/lie-2.2.2+dfsg/lie.h FINAL RESULTS: data/lie-2.2.2+dfsg/ansi.h:70:60: [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. __attribute__ ((format (printf,1,2))); data/lie-2.2.2+dfsg/ansi.h:72:60: [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. __attribute__ ((format (printf,1,2))); data/lie-2.2.2+dfsg/ansi.h:74:60: [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(char* format, ...) __attribute__ ((format (printf,1,2))); data/lie-2.2.2+dfsg/ansi.h:75:60: [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. void err_Printf(char* format, ...) __attribute__ ((format (printf,1,2))); data/lie-2.2.2+dfsg/ansi.h:76:60: [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. void monprintf(char* format, ...) __attribute__ ((format (printf,1,2))); data/lie-2.2.2+dfsg/binmat.c:55: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(result->dirname,dirname); data/lie-2.2.2+dfsg/binmat.c:56: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(result->name,name); data/lie-2.2.2+dfsg/binmat.c:67: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(filename,infofil); data/lie-2.2.2+dfsg/binmat.c:68: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(filename,SUFFIX); data/lie-2.2.2+dfsg/binmat.c:84: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(filename, infofil); data/lie-2.2.2+dfsg/binmat.c:85: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(filename,SUFFIX); data/lie-2.2.2+dfsg/gapprint.c:280:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. pt+=sprintf(promptlabel+pt,"/%s",name_tab[info_depth.p[i]]); data/lie-2.2.2+dfsg/gapprint.c:281:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (n == -1) sprintf(promptlabel,"/%s",PROMPT); data/lie-2.2.2+dfsg/gapprint.c:282:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(promptlabel+pt,"/%s%s",name_tab[info_depth.p[i]],PROMPT); data/lie-2.2.2+dfsg/gapprint.c:315:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name,"%s>",name_tab[rec->keyword]); data/lie-2.2.2+dfsg/gapprint.c:512:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(infofile,"%s.%ld",infofil,(long)foundinfo->seq); data/lie-2.2.2+dfsg/init.c:96:27: [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). { if (initfil[0]=='\0') strcpy(initfil, INITFIL); data/lie-2.2.2+dfsg/init.c:97: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(dirpath, infofil); data/lie-2.2.2+dfsg/init.c:98: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(learnfil, infofil); data/lie-2.2.2+dfsg/init.c:99: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(titlefil, infofil); data/lie-2.2.2+dfsg/init.c:103: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(infoind, infofil); data/lie-2.2.2+dfsg/init.c:104: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(learnind, learnfil); data/lie-2.2.2+dfsg/init.c:165: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(editor, p==NULL ? DEFAULT_EDITOR : p); data/lie-2.2.2+dfsg/init.c:167: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(pager, p==NULL ? DEFAULT_PAGER : p); data/lie-2.2.2+dfsg/init.c:169: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(promptlabel,PROMPT); data/lie-2.2.2+dfsg/lexer.c:83: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). { char *s=strcat(strcpy(alloc_array(char,strlen(a)+2),"."),a); data/lie-2.2.2+dfsg/main.c:73: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(promptlabel,PROMPT); data/lie-2.2.2+dfsg/main.c:87:9: [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(initfil,argv[nr++]); data/lie-2.2.2+dfsg/main.c:92:9: [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(infofil,argv[nr++]); data/lie-2.2.2+dfsg/node.c:122:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s->data.val->t.string, t); data/lie-2.2.2+dfsg/node.c:170:49: [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). if ((s=code_obj_type(typeno&TYPEMASK))!=NULL) strcpy(p,s); data/lie-2.2.2+dfsg/node.c:172: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,s); p[2]='l'; } data/lie-2.2.2+dfsg/node.c:182:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. return sprintf(buff,"%s:",class_name[i].str),buff; data/lie-2.2.2+dfsg/output.c:6:28: [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. va_start(ap, format); nc=vfprintf(cur_out, format, ap); data/lie-2.2.2+dfsg/output.c:7:19: [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. if (am_monitor) vfprintf(monfile, format, ap); data/lie-2.2.2+dfsg/output.c:13:24: [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. va_start(ap,format); vfprintf(stderr, format, ap); data/lie-2.2.2+dfsg/output.c:14:19: [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. if (am_monitor) vfprintf(monfile, format, ap); data/lie-2.2.2+dfsg/output.c:24:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/lie-2.2.2+dfsg/output.c:25:21: [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. if (am_monitor) vfprintf(monfile, format, ap); data/lie-2.2.2+dfsg/output.c:62:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/lie-2.2.2+dfsg/output.c:71:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(monfile, format, ap); data/lie-2.2.2+dfsg/output.c:94: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(buf,prog); buf[l]=' '; strcpy(&buf[l+1],args); data/lie-2.2.2+dfsg/output.c:94:33: [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(buf,prog); buf[l]=' '; strcpy(&buf[l+1],args); data/lie-2.2.2+dfsg/output.c:95:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(buf); freem(buf); data/lie-2.2.2+dfsg/parseaux.c:35:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (l<10) sprintf(s,"\"%s\"",t); else sprintf(s,"\"%.6s...\"",t); data/lie-2.2.2+dfsg/print.c:293:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. pt+=sprintf(promptlabel+pt,"/%s",name_tab[info_depth.p[i]]); data/lie-2.2.2+dfsg/print.c:294:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if (n == -1) sprintf(promptlabel,"/%s",PROMPT); data/lie-2.2.2+dfsg/print.c:295:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(promptlabel+pt,"/%s%s",name_tab[info_depth.p[i]],PROMPT); data/lie-2.2.2+dfsg/print.c:328:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name,"%s>",name_tab[rec->keyword]); data/lie-2.2.2+dfsg/print.c:525:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(infofile,"%s.%ld",infofil,(long)foundinfo->seq); data/lie-2.2.2+dfsg/static/static2.c:778: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,buf); data/lie-2.2.2+dfsg/static/static2.c:799:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(t,"%s.%d",buf,n); data/lie-2.2.2+dfsg/static/static4.c:619: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(result->t.string,s->t.string); data/lie-2.2.2+dfsg/static/static4.c:620: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(result->t.string,t->t.string); data/lie-2.2.2+dfsg/static/static4.c:627: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(&result->string[t->len],s); data/lie-2.2.2+dfsg/static/static4.c:636: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(result->string,s); data/lie-2.2.2+dfsg/static/static4.c:637: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(&result->string[l],t->string); data/lie-2.2.2+dfsg/static/static4.c:671: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(p,t->string); data/lie-2.2.2+dfsg/static/static4.c:680: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(&result->string[t->len],grp_txt); data/lie-2.2.2+dfsg/static/static4.c:689: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(result->string,grp_txt); data/lie-2.2.2+dfsg/static/static4.c:690: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(&result->string[l],t->string); data/lie-2.2.2+dfsg/static/static4.c:705:2: [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(result->string,t->string); data/lie-2.2.2+dfsg/static/static4.c:726:15: [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). if (left) strcpy(str,s); data/lie-2.2.2+dfsg/static/static4.c:728: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(str+(width-n),s); data/lie-2.2.2+dfsg/util/infoind.c:35: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). else strcpy(key,start); data/lie-2.2.2+dfsg/util/infoind.c:47:26: [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). make_key(start,key); strcpy(inf->parents.p[i++],key); data/lie-2.2.2+dfsg/util/infoind.c:53:28: [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). { make_key(start,key); strcpy(inf->parents.p[i],key); data/lie-2.2.2+dfsg/util/infoind.c:73: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(indexfil,INDEXFIL); data/lie-2.2.2+dfsg/util/infoind.c:80:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(infofil,"%s.%d",INFOFIL,i); data/lie-2.2.2+dfsg/util/infoind.c:96: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(info.keyword,key); data/lie-2.2.2+dfsg/util/learnind.c:27: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(indexfil,INDEXFIL); strcpy(learnfil,LEARNFIL); data/lie-2.2.2+dfsg/util/learnind.c:27:30: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(indexfil,INDEXFIL); strcpy(learnfil,LEARNFIL); data/lie-2.2.2+dfsg/util/learnind.c:42:9: [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(learn.keyword,key); learn.start=file_adress+location_start; data/lie-2.2.2+dfsg/util/learnind.c:55: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). else strcpy(key,bufpt+1); data/lie-2.2.2+dfsg/gapprint.c:588:7: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/gapprint.c:972:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:997:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:1018:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/init.c:164:13: [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* p=getenv("EDITOR"); data/lie-2.2.2+dfsg/init.c:166: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. p=getenv("PAGER"); data/lie-2.2.2+dfsg/learn.c:9: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/lie-2.2.2+dfsg/learn.c:134:5: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). tmpnam(tmpfile); data/lie-2.2.2+dfsg/print.c:601:7: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/print.c:985:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1010:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1031:12: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/binmat.c:8: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 name[KEYWORDLEN], dirname[KEYWORDLEN]; data/lie-2.2.2+dfsg/binmat.c:53:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&result[1],m, n); /* copy |m| after header */ data/lie-2.2.2+dfsg/binmat.c:66: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 filename[LABELLENGTH]; data/lie-2.2.2+dfsg/binmat.c:69:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename,"a"); data/lie-2.2.2+dfsg/binmat.c:82:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[LABELLENGTH]; data/lie-2.2.2+dfsg/binmat.c:86:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename,"r"); data/lie-2.2.2+dfsg/binmat.c:113:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(t,"w"); data/lie-2.2.2+dfsg/binmat.c:126:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name,"r"); data/lie-2.2.2+dfsg/gapprint.c:16:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char narg,t[7]; data/lie-2.2.2+dfsg/gapprint.c:21:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { char *t[REPORT_LEN]; int pt;} table_tp; data/lie-2.2.2+dfsg/gapprint.c:35:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { char s[entry_width+1]; index i,j; data/lie-2.2.2+dfsg/gapprint.c:41: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(s, "%ld", (long)(min<-(max/10) ? min : max)); data/lie-2.2.2+dfsg/gapprint.c:156:8: [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. n+=sprintf(buffer,"%ld",(long)grp->liecomp[i]->lierank); data/lie-2.2.2+dfsg/gapprint.c:157: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. n+=sprintf(buffer,"%ld",(long)grp->toraldim); data/lie-2.2.2+dfsg/gapprint.c:161:8: [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. n+=sprintf(&buf[n],"%c%ld" data/lie-2.2.2+dfsg/gapprint.c:164: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[n], "T%ld", (long)grp->toraldim); data/lie-2.2.2+dfsg/gapprint.c:314:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { char name[KEYWORDLEN+1]; data/lie-2.2.2+dfsg/gapprint.c:334: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). { indexpt=fopen(infoind,readmode); data/lie-2.2.2+dfsg/gapprint.c:494: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 infofile[LABELLENGTH]; data/lie-2.2.2+dfsg/gapprint.c:513:10: [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). infopt=fopen(infofile,readmode); data/lie-2.2.2+dfsg/gapprint.c:553:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:553:15: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). static char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:588:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/gapprint.c:588:32: [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). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/gapprint.c:588:38: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/gapprint.c:634:27: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). invoke_prog(pager,tmpfile); remove(tmpfile); data/lie-2.2.2+dfsg/gapprint.c:634:44: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). invoke_prog(pager,tmpfile); remove(tmpfile); data/lie-2.2.2+dfsg/gapprint.c:966: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:966:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:971:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/gapprint.c:972:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:972:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:972:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:986:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/gapprint.c:986:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/gapprint.c:992: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:992:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:996:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/gapprint.c:997:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:997:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:997:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:1007:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/gapprint.c:1007:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/gapprint.c:1013: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:1013:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/gapprint.c:1017:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/gapprint.c:1018:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:1018:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:1018:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/gapprint.c:1028:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/gapprint.c:1028:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/infolrn.h:8: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 p[N_PARENTS][KEYWORDLEN]; data/lie-2.2.2+dfsg/infolrn.h:14: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 keyword[KEYWORDLEN]; data/lie-2.2.2+dfsg/infolrn.h:18:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char narg,t[7]; data/lie-2.2.2+dfsg/infolrn.h:24: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 keyword[KEYWORDLEN]; data/lie-2.2.2+dfsg/init.c:100: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(infofil,"INFO"); data/lie-2.2.2+dfsg/init.c:101: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(learnfil,"LEARN"); data/lie-2.2.2+dfsg/init.c:102: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(titlefil,"title"); data/lie-2.2.2+dfsg/init.c:105: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(infoind,".ind"); data/lie-2.2.2+dfsg/init.c:106: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(learnind,".ind"); data/lie-2.2.2+dfsg/init.c:107:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(monfil, "monfile"); data/lie-2.2.2+dfsg/init.c:155:18: [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* f= fopen(titlefil,"r"); data/lie-2.2.2+dfsg/learn.c:6:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *directory_table[REPORT_LEN]; data/lie-2.2.2+dfsg/learn.c:80: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/learn.c:80:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/learn.c:96:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). indexpt = fopen(learnind,readmode); data/lie-2.2.2+dfsg/learn.c:134:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpnam(tmpfile); data/lie-2.2.2+dfsg/learn.c:135:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cur_out = fopen(tmpfile, "w"); data/lie-2.2.2+dfsg/learn.c:135:21: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). cur_out = fopen(tmpfile, "w"); data/lie-2.2.2+dfsg/learn.c:152:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). learnpt = fopen(learnfil,readmode); data/lie-2.2.2+dfsg/learn.c:173:23: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). invoke_prog(pager,tmpfile); data/lie-2.2.2+dfsg/learn.c:174:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). remove(tmpfile); data/lie-2.2.2+dfsg/learn.c:190:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). indexpt = fopen(learnind,readmode); data/lie-2.2.2+dfsg/lexer.c:55:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subject_name[subject_name_limit]; data/lie-2.2.2+dfsg/lexer.c:158:31: [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(subject_name,"%.*s",subject_name_limit-1,tok_buf); data/lie-2.2.2+dfsg/lexer.c:201:67: [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). if (short_ints) { code=INT; yylval.val=atol(tok_buf); } data/lie-2.2.2+dfsg/main.c:9:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINELENGTH]; data/lie-2.2.2+dfsg/main.c:10:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char label2[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:11:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char monfil[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:12:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char infofil[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:13:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char infoind[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:14:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char initfil[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:15:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char learnind[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:16:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char learnfil[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:17:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char titlefil[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:18:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dirpath[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:19:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char promptlabel[LABELLENGTH]; data/lie-2.2.2+dfsg/main.c:20:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pager[LABELLENGTH],editor[LABELLENGTH]; data/lie-2.2.2+dfsg/mem.c:88:30: [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 struct { objtype num; char str[4];} type_name [] = data/lie-2.2.2+dfsg/node.c:166:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { static char buff[2][8]; static int alt=0; /* alternates between calls */ data/lie-2.2.2+dfsg/node.c:169:26: [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. if ((typeno&FUN)!=0) { strcpy(p,"fun "); typeno&=~FUN; p+=4; } data/lie-2.2.2+dfsg/node.c:173:8: [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. else strcpy(p,"???"); data/lie-2.2.2+dfsg/node.c:178:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { static char buff[sizeof("function_copied")+1]; data/lie-2.2.2+dfsg/onoff.c:36:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((monfile = fopen(monfil,"a"))==NULL) data/lie-2.2.2+dfsg/output.c:78:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). monfile = fopen(file_arg, "w"); data/lie-2.2.2+dfsg/output.c:120:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((cur_in=fopen(name,"r"))!=NULL) data/lie-2.2.2+dfsg/parseaux.c:21:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { static char s[12]; data/lie-2.2.2+dfsg/parseaux.c:29:15: [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. case INT: sprintf(s,"%ld",yylval.val); return s; data/lie-2.2.2+dfsg/parseaux.c:31:19: [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. case GROUPID: sprintf(s,"%c",yylval.sub); return s; data/lie-2.2.2+dfsg/parseaux.c:35:41: [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. if (l<10) sprintf(s,"\"%s\"",t); else sprintf(s,"\"%.6s...\"",t); data/lie-2.2.2+dfsg/parseaux.c:110:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cur_out=fopen(fname,mode); data/lie-2.2.2+dfsg/print.c:16:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char narg,t[7]; data/lie-2.2.2+dfsg/print.c:21:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { char *t[REPORT_LEN]; int pt;} table_tp; data/lie-2.2.2+dfsg/print.c:35:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { char s[entry_width+1]; index i,j; data/lie-2.2.2+dfsg/print.c:41: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(s, "%ld", (long)(min<-(max/10) ? min : max)); data/lie-2.2.2+dfsg/print.c:163:8: [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. n+=sprintf(buffer,"%ld",(long)grp->liecomp[i]->lierank); data/lie-2.2.2+dfsg/print.c:164: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. n+=sprintf(buffer,"%ld",(long)grp->toraldim); data/lie-2.2.2+dfsg/print.c:168:8: [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. n+=sprintf(&buf[n],"%c%ld" data/lie-2.2.2+dfsg/print.c:171: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[n], "T%ld", (long)grp->toraldim); data/lie-2.2.2+dfsg/print.c:327:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { char name[KEYWORDLEN+1]; data/lie-2.2.2+dfsg/print.c:347: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). { indexpt=fopen(infoind,readmode); data/lie-2.2.2+dfsg/print.c:507: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 infofile[LABELLENGTH]; data/lie-2.2.2+dfsg/print.c:526:10: [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). infopt=fopen(infofile,readmode); data/lie-2.2.2+dfsg/print.c:566:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:566:15: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). static char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:601:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/print.c:601:32: [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). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/print.c:601:38: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); invoke_pager=true; } data/lie-2.2.2+dfsg/print.c:647:27: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). invoke_prog(pager,tmpfile); remove(tmpfile); data/lie-2.2.2+dfsg/print.c:647:44: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). invoke_prog(pager,tmpfile); remove(tmpfile); data/lie-2.2.2+dfsg/print.c:979: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:979:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:984:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/print.c:985:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:985:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:985:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:999:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/print.c:999:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/print.c:1005: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:1005:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:1009:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/print.c:1010:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1010:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1010:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1020:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/print.c:1020:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/print.c:1026: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 tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:1026:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). { char tmpfile[L_tmpnam]; data/lie-2.2.2+dfsg/print.c:1030:33: [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 (filename!=NULL) cur_out=fopen(filename, "w"); data/lie-2.2.2+dfsg/print.c:1031:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1031:37: [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). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1031:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). else { tmpnam(tmpfile); cur_out=fopen(tmpfile, "w"); } data/lie-2.2.2+dfsg/print.c:1041:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/print.c:1041:64: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (filename==NULL) { invoke_prog(pager,tmpfile); remove(tmpfile); } data/lie-2.2.2+dfsg/static/static2.c:728:47: [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). Liecomp(result,i++)=mksimpgrp(lietype,(index)atoi(s)); data/lie-2.2.2+dfsg/static/static2.c:730:38: [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). else result->g.toraldim=(index)atoi(++s); data/lie-2.2.2+dfsg/static/static2.c:779:7: [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. t=strcat(t,".1"); data/lie-2.2.2+dfsg/static/static4.c:626: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(result->string,t->string,t->len); data/lie-2.2.2+dfsg/static/static4.c:644:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { size_t l=1+v->ncomp; index i; char buf[20]; data/lie-2.2.2+dfsg/static/static4.c:648:35: [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. for (i=0; i<v->ncomp; ++i) l+=sprintf(buf,"%ld",(long)v->compon[i]); data/lie-2.2.2+dfsg/static/static4.c:649:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. result=mktekst(t->len+l); memcpy(result->string,t->string,t->len); data/lie-2.2.2+dfsg/static/static4.c:652:22: [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. if (v->ncomp>0) p+=sprintf(p,"%ld",(long)v->compon[0]); data/lie-2.2.2+dfsg/static/static4.c:653:33: [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. for (i=1; i<v->ncomp; ++i) p+=sprintf(p,",%ld",(long)v->compon[i]); data/lie-2.2.2+dfsg/static/static4.c:660:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { size_t l=1+v->ncomp; index i; char buf[20]; data/lie-2.2.2+dfsg/static/static4.c:664:35: [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. for (i=0; i<v->ncomp; ++i) l+=sprintf(buf,"%ld",(long)v->compon[i]); data/lie-2.2.2+dfsg/static/static4.c:668:22: [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. if (v->ncomp>0) p+=sprintf(p,"%ld",(long)v->compon[0]); data/lie-2.2.2+dfsg/static/static4.c:669:33: [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. for (i=1; i<v->ncomp; ++i) p+=sprintf(p,",%ld",(long)v->compon[i]); data/lie-2.2.2+dfsg/static/static4.c:679: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(result->string,t->string,t->len); data/lie-2.2.2+dfsg/util/infoind.c:40:44: [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. { int i=0; char* pt=strchr(start,KEYCHAR); char key[KEYWORDLEN]; data/lie-2.2.2+dfsg/util/infoind.c:64: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 indexfil[LABELLENGTH]; data/lie-2.2.2+dfsg/util/infoind.c:65: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 infofil[LABELLENGTH]; data/lie-2.2.2+dfsg/util/infoind.c:66: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[BUFSIZE+1]; data/lie-2.2.2+dfsg/util/infoind.c:67: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 key[KEYWORDLEN]; data/lie-2.2.2+dfsg/util/infoind.c:74: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). indexpt=fopen(indexfil,writemode); data/lie-2.2.2+dfsg/util/infoind.c:81:17: [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 ((infopt=fopen(infofil,readmode))==0) data/lie-2.2.2+dfsg/util/learnind.c:16: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 indexfil[LABELLENGTH]; data/lie-2.2.2+dfsg/util/learnind.c:17: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 learnfil[LABELLENGTH]; data/lie-2.2.2+dfsg/util/learnind.c:18: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[BUFSIZE+1]; data/lie-2.2.2+dfsg/util/learnind.c:20: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 key[KEYWORDLEN]; data/lie-2.2.2+dfsg/util/learnind.c:28: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). learnpt=fopen(learnfil,readmode); data/lie-2.2.2+dfsg/util/learnind.c:31: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). indexpt=fopen(indexfil,writemode); data/lie-2.2.2+dfsg/bigint.c:251: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). bigint* result = mkbigint(2 + strlen(s)/4); int i; data/lie-2.2.2+dfsg/bigint.c:279: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 = len-strlen(s); data/lie-2.2.2+dfsg/gapprint.c:8: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). #define needs_nl (level*strlen(tab) != nc) data/lie-2.2.2+dfsg/gapprint.c:42: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). result[j]=strlen(s); data/lie-2.2.2+dfsg/gapprint.c:92: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). c=bigint2str(max_coef); l=strlen(c); freem(c); data/lie-2.2.2+dfsg/gapprint.c:93: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). c=bigint2str(min_coef); coef_width=Max(l,strlen(c)); freem(c); data/lie-2.2.2+dfsg/gapprint.c:139: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). c=bigint2str(max_coef); l=strlen(c); freem(c); data/lie-2.2.2+dfsg/gapprint.c:140: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). c=bigint2str(min_coef); coef_width=Max(l,strlen(c)); freem(c); data/lie-2.2.2+dfsg/gapprint.c:507:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (name[0] == '$' && strlen(name) != 1) return false; data/lie-2.2.2+dfsg/gapprint.c:531: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). resultpt+=(strlen(resultpt)+1); data/lie-2.2.2+dfsg/gapprint.c:593:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(c)>0) data/lie-2.2.2+dfsg/gapprint.c:641: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 first=aname&&strlen(aname)?aname[0]:'?'; data/lie-2.2.2+dfsg/getl.c:39:44: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (redirected_input || cur_in!=stdin) c=getc(cur_in); data/lie-2.2.2+dfsg/getl.c:58:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { int c=getc(cur_in); if (am_monitor && c!=EOF) putc(c,monfile); return c; } data/lie-2.2.2+dfsg/init.c:157:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else { while ((ch=getc(f)) != EOF) putchar(ch); fclose(f); } data/lie-2.2.2+dfsg/learn.c:37:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(directory_table[i]) > KEYWORDLEN) data/lie-2.2.2+dfsg/learn.c:49:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while (keypt && strncmp(keypt,name,strlen(name))) data/lie-2.2.2+dfsg/lexer.c:63:44: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). char_point+=len; chars_left-=len; return strncpy(result,s,len); data/lie-2.2.2+dfsg/lexer.c:78: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). name_tab[hash_count]=copy ? store(str,(int)strlen(str)): str; data/lie-2.2.2+dfsg/lexer.c:83:18: [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. { char *s=strcat(strcpy(alloc_array(char,strlen(a)+2),"."),a); data/lie-2.2.2+dfsg/lexer.c:83: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 *s=strcat(strcpy(alloc_array(char,strlen(a)+2),"."),a); data/lie-2.2.2+dfsg/lexer.c:93:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). tok_buf=strncpy(alloc_array(char,tok_buf_size*=2),tok_buf,tok_len); data/lie-2.2.2+dfsg/main.c:93:9: [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(infofil,"/"); data/lie-2.2.2+dfsg/mem.c:353:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(result->string,o->string,n); data/lie-2.2.2+dfsg/node.c:120: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). s->data.val=(object)mktekst(strlen(t)); data/lie-2.2.2+dfsg/output.c:93: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). { size_t l=strlen(prog); char* buf=allocmem(l+strlen(args)+2); data/lie-2.2.2+dfsg/output.c:93: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). { size_t l=strlen(prog); char* buf=allocmem(l+strlen(args)+2); data/lie-2.2.2+dfsg/parseaux.c:34: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). { char* t=yylval.sym->data.val->t.string; size_t l=strlen(t); data/lie-2.2.2+dfsg/parseaux.c:103:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name)==0) error("Assigning to subscripted non-variable\n"); data/lie-2.2.2+dfsg/parseaux.c:104:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name)==1 && (name[0] < 'a' || name[0] > 'z')) data/lie-2.2.2+dfsg/print.c:8: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). #define needs_nl (level*strlen(tab) != nc) data/lie-2.2.2+dfsg/print.c:42: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). result[j]=strlen(s); data/lie-2.2.2+dfsg/print.c:92: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). c=bigint2str(max_coef); l=strlen(c); freem(c); data/lie-2.2.2+dfsg/print.c:93: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). c=bigint2str(min_coef); coef_width=Max(l,strlen(c)); freem(c); data/lie-2.2.2+dfsg/print.c:146: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). c=bigint2str(max_coef); l=strlen(c); freem(c); data/lie-2.2.2+dfsg/print.c:147: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). c=bigint2str(min_coef); coef_width=Max(l,strlen(c)); freem(c); data/lie-2.2.2+dfsg/print.c:520:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (name[0] == '$' && strlen(name) != 1) return false; data/lie-2.2.2+dfsg/print.c:544: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). resultpt+=(strlen(resultpt)+1); data/lie-2.2.2+dfsg/print.c:606:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(c)>0) data/lie-2.2.2+dfsg/print.c:654: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 first=aname&&strlen(aname)?aname[0]:'?'; data/lie-2.2.2+dfsg/static/static2.c:777: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). t=malloc(strlen(buf)+4); data/lie-2.2.2+dfsg/static/static2.c:798: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). t=malloc(strlen(buf)+4); data/lie-2.2.2+dfsg/static/static4.c:625: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). { string s = bigint2str(b); tekst *result = mktekst(t->len + strlen(s)); data/lie-2.2.2+dfsg/static/static4.c:634:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { string s = bigint2str(b); size_t l= (int) strlen(s); data/lie-2.2.2+dfsg/static/static4.c:654:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(p,"]"); data/lie-2.2.2+dfsg/static/static4.c:677:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { string grp_txt = grp2str(g); int n = (int)strlen(grp_txt); data/lie-2.2.2+dfsg/static/static4.c:687: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). { string grp_txt = grp2str(g); size_t l = (int)strlen(grp_txt); data/lie-2.2.2+dfsg/static/static4.c:717:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(s),i; data/lie-2.2.2+dfsg/util/infoind.c:31:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). { if (strlen(start) >= KEYWORDLEN) data/lie-2.2.2+dfsg/util/infoind.c:32:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). { strncpy(key,start,KEYWORDLEN-1); key[KEYWORDLEN-1] = '\0'; data/lie-2.2.2+dfsg/util/infoind.c:50:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(start)>0) data/lie-2.2.2+dfsg/util/learnind.c:51:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(bufpt+1) >= KEYWORDLEN) data/lie-2.2.2+dfsg/util/learnind.c:52:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). { strncpy(key,bufpt+1,KEYWORDLEN-1); key[KEYWORDLEN-1]='\0'; ANALYSIS SUMMARY: Hits = 310 Lines analyzed = 15081 in approximately 0.49 seconds (30587 lines/second) Physical Source Lines of Code (SLOC) = 12761 Hits@level = [0] 37 [1] 53 [2] 171 [3] 12 [4] 74 [5] 0 Hits@level+ = [0+] 347 [1+] 310 [2+] 257 [3+] 86 [4+] 74 [5+] 0 Hits/KSLOC@level+ = [0+] 27.1922 [1+] 24.2928 [2+] 20.1395 [3+] 6.73928 [4+] 5.79892 [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.