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/zephyr-3.1.2/clients/zaway/zaway.c Examining data/zephyr-3.1.2/clients/zctl/zctl.c Examining data/zephyr-3.1.2/clients/zleave/zleave.c Examining data/zephyr-3.1.2/clients/zlocate/zlocate.c Examining data/zephyr-3.1.2/clients/znol/znol.c Examining data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c Examining data/zephyr-3.1.2/clients/zstat/zserver.h Examining data/zephyr-3.1.2/clients/zstat/zstat.c Examining data/zephyr-3.1.2/clients/zwrite/zwrite.c Examining data/zephyr-3.1.2/h/internal.h Examining data/zephyr-3.1.2/h/sysdep.h Examining data/zephyr-3.1.2/h/zephyr/mit-copyright.h Examining data/zephyr-3.1.2/h/zephyr/zephyr.h Examining data/zephyr-3.1.2/lib/ZAsyncLocate.c Examining data/zephyr-3.1.2/lib/ZCkAuth.c Examining data/zephyr-3.1.2/lib/ZCkIfNot.c Examining data/zephyr-3.1.2/lib/ZCkZAut.c Examining data/zephyr-3.1.2/lib/ZClosePort.c Examining data/zephyr-3.1.2/lib/ZCmpUID.c Examining data/zephyr-3.1.2/lib/ZCmpUIDP.c Examining data/zephyr-3.1.2/lib/ZDumpSession.c Examining data/zephyr-3.1.2/lib/ZExpnRlm.c Examining data/zephyr-3.1.2/lib/ZFlsLocs.c Examining data/zephyr-3.1.2/lib/ZFlsSubs.c Examining data/zephyr-3.1.2/lib/ZFmtAuth.c Examining data/zephyr-3.1.2/lib/ZFmtList.c Examining data/zephyr-3.1.2/lib/ZFmtNotice.c Examining data/zephyr-3.1.2/lib/ZFmtRaw.c Examining data/zephyr-3.1.2/lib/ZFmtRawLst.c Examining data/zephyr-3.1.2/lib/ZFmtSmRLst.c Examining data/zephyr-3.1.2/lib/ZFmtSmRaw.c Examining data/zephyr-3.1.2/lib/ZFreeNot.c Examining data/zephyr-3.1.2/lib/ZGetLocs.c Examining data/zephyr-3.1.2/lib/ZGetSender.c Examining data/zephyr-3.1.2/lib/ZGetSubs.c Examining data/zephyr-3.1.2/lib/ZGetWGPort.c Examining data/zephyr-3.1.2/lib/ZIfNotice.c Examining data/zephyr-3.1.2/lib/ZInit.c Examining data/zephyr-3.1.2/lib/ZLocations.c Examining data/zephyr-3.1.2/lib/ZMakeAscii.c Examining data/zephyr-3.1.2/lib/ZMakeZcode.c Examining data/zephyr-3.1.2/lib/ZMkAuth.c Examining data/zephyr-3.1.2/lib/ZNewLocU.c Examining data/zephyr-3.1.2/lib/ZOpenPort.c Examining data/zephyr-3.1.2/lib/ZParseNot.c Examining data/zephyr-3.1.2/lib/ZPeekIfNot.c Examining data/zephyr-3.1.2/lib/ZPeekNot.c Examining data/zephyr-3.1.2/lib/ZPeekPkt.c Examining data/zephyr-3.1.2/lib/ZPending.c Examining data/zephyr-3.1.2/lib/ZReadAscii.c Examining data/zephyr-3.1.2/lib/ZReadZcode.c Examining data/zephyr-3.1.2/lib/ZRecvNot.c Examining data/zephyr-3.1.2/lib/ZRecvPkt.c Examining data/zephyr-3.1.2/lib/ZRetSubs.c Examining data/zephyr-3.1.2/lib/ZSendList.c Examining data/zephyr-3.1.2/lib/ZSendNot.c Examining data/zephyr-3.1.2/lib/ZSendPkt.c Examining data/zephyr-3.1.2/lib/ZSendRLst.c Examining data/zephyr-3.1.2/lib/ZSendRaw.c Examining data/zephyr-3.1.2/lib/ZSetDest.c Examining data/zephyr-3.1.2/lib/ZSetFD.c Examining data/zephyr-3.1.2/lib/ZSetSrv.c Examining data/zephyr-3.1.2/lib/ZSubs.c Examining data/zephyr-3.1.2/lib/ZVariables.c Examining data/zephyr-3.1.2/lib/ZWait4Not.c Examining data/zephyr-3.1.2/lib/ZhmStat.c Examining data/zephyr-3.1.2/lib/Zinternal.c Examining data/zephyr-3.1.2/lib/charset.c Examining data/zephyr-3.1.2/lib/mit-copyright.h Examining data/zephyr-3.1.2/lib/quad_cksum.c Examining data/zephyr-3.1.2/lib/smwgc.c Examining data/zephyr-3.1.2/server/access.c Examining data/zephyr-3.1.2/server/access.h Examining data/zephyr-3.1.2/server/acl.h Examining data/zephyr-3.1.2/server/acl_files.c Examining data/zephyr-3.1.2/server/bdump.c Examining data/zephyr-3.1.2/server/class.c Examining data/zephyr-3.1.2/server/client.c Examining data/zephyr-3.1.2/server/common.c Examining data/zephyr-3.1.2/server/dispatch.c Examining data/zephyr-3.1.2/server/global.c Examining data/zephyr-3.1.2/server/kstuff.c Examining data/zephyr-3.1.2/server/main.c Examining data/zephyr-3.1.2/server/realm.c Examining data/zephyr-3.1.2/server/server.c Examining data/zephyr-3.1.2/server/subscr.c Examining data/zephyr-3.1.2/server/test_server.c Examining data/zephyr-3.1.2/server/timer.c Examining data/zephyr-3.1.2/server/timer.h Examining data/zephyr-3.1.2/server/uloc.c Examining data/zephyr-3.1.2/server/utf8proc.c Examining data/zephyr-3.1.2/server/utf8proc.h Examining data/zephyr-3.1.2/server/utf8proc_data.c Examining data/zephyr-3.1.2/server/version.c Examining data/zephyr-3.1.2/server/zserver.h Examining data/zephyr-3.1.2/server/zsrv_conf.h Examining data/zephyr-3.1.2/server/zstring.c Examining data/zephyr-3.1.2/server/zstring.h Examining data/zephyr-3.1.2/zhm/queue.c Examining data/zephyr-3.1.2/zhm/timer.c Examining data/zephyr-3.1.2/zhm/timer.h Examining data/zephyr-3.1.2/zhm/zhm.c Examining data/zephyr-3.1.2/zhm/zhm.h Examining data/zephyr-3.1.2/zhm/zhm_client.c Examining data/zephyr-3.1.2/zhm/zhm_server.c Examining data/zephyr-3.1.2/zwgc/X_driver.c Examining data/zephyr-3.1.2/zwgc/X_driver.h Examining data/zephyr-3.1.2/zwgc/X_fonts.c Examining data/zephyr-3.1.2/zwgc/X_fonts.h Examining data/zephyr-3.1.2/zwgc/X_gram.c Examining data/zephyr-3.1.2/zwgc/X_gram.h Examining data/zephyr-3.1.2/zwgc/browser.c Examining data/zephyr-3.1.2/zwgc/browser.h Examining data/zephyr-3.1.2/zwgc/buffer.c Examining data/zephyr-3.1.2/zwgc/buffer.h Examining data/zephyr-3.1.2/zwgc/character_class.c Examining data/zephyr-3.1.2/zwgc/character_class.h Examining data/zephyr-3.1.2/zwgc/dictionary.c Examining data/zephyr-3.1.2/zwgc/dictionary.h Examining data/zephyr-3.1.2/zwgc/error.c Examining data/zephyr-3.1.2/zwgc/error.h Examining data/zephyr-3.1.2/zwgc/eval.c Examining data/zephyr-3.1.2/zwgc/eval.h Examining data/zephyr-3.1.2/zwgc/exec.c Examining data/zephyr-3.1.2/zwgc/exec.h Examining data/zephyr-3.1.2/zwgc/file.c Examining data/zephyr-3.1.2/zwgc/file.h Examining data/zephyr-3.1.2/zwgc/formatter.c Examining data/zephyr-3.1.2/zwgc/formatter.h Examining data/zephyr-3.1.2/zwgc/lexer.c Examining data/zephyr-3.1.2/zwgc/lexer.h Examining data/zephyr-3.1.2/zwgc/main.c Examining data/zephyr-3.1.2/zwgc/main.h Examining data/zephyr-3.1.2/zwgc/mux.c Examining data/zephyr-3.1.2/zwgc/mux.h Examining data/zephyr-3.1.2/zwgc/new_memory.c Examining data/zephyr-3.1.2/zwgc/new_memory.h Examining data/zephyr-3.1.2/zwgc/new_string.c Examining data/zephyr-3.1.2/zwgc/new_string.h Examining data/zephyr-3.1.2/zwgc/node.c Examining data/zephyr-3.1.2/zwgc/node.h Examining data/zephyr-3.1.2/zwgc/notice.c Examining data/zephyr-3.1.2/zwgc/notice.h Examining data/zephyr-3.1.2/zwgc/parser.h Examining data/zephyr-3.1.2/zwgc/plus.c Examining data/zephyr-3.1.2/zwgc/plus.h Examining data/zephyr-3.1.2/zwgc/pointer.h Examining data/zephyr-3.1.2/zwgc/port.c Examining data/zephyr-3.1.2/zwgc/port.h Examining data/zephyr-3.1.2/zwgc/regexp.c Examining data/zephyr-3.1.2/zwgc/regexp.h Examining data/zephyr-3.1.2/zwgc/stack.h Examining data/zephyr-3.1.2/zwgc/standard_ports.c Examining data/zephyr-3.1.2/zwgc/string_dictionary_aux.c Examining data/zephyr-3.1.2/zwgc/string_dictionary_aux.h Examining data/zephyr-3.1.2/zwgc/subscriptions.c Examining data/zephyr-3.1.2/zwgc/subscriptions.h Examining data/zephyr-3.1.2/zwgc/substitute.c Examining data/zephyr-3.1.2/zwgc/substitute.h Examining data/zephyr-3.1.2/zwgc/text_operations.c Examining data/zephyr-3.1.2/zwgc/text_operations.h Examining data/zephyr-3.1.2/zwgc/tty_filter.c Examining data/zephyr-3.1.2/zwgc/tty_filter.h Examining data/zephyr-3.1.2/zwgc/unsigned_long.h Examining data/zephyr-3.1.2/zwgc/variables.c Examining data/zephyr-3.1.2/zwgc/variables.h Examining data/zephyr-3.1.2/zwgc/xcut.c Examining data/zephyr-3.1.2/zwgc/xcut.h Examining data/zephyr-3.1.2/zwgc/xerror.c Examining data/zephyr-3.1.2/zwgc/xerror.h Examining data/zephyr-3.1.2/zwgc/xmark.c Examining data/zephyr-3.1.2/zwgc/xmark.h Examining data/zephyr-3.1.2/zwgc/xrevstack.c Examining data/zephyr-3.1.2/zwgc/xrevstack.h Examining data/zephyr-3.1.2/zwgc/xselect.c Examining data/zephyr-3.1.2/zwgc/xselect.h Examining data/zephyr-3.1.2/zwgc/xshow.c Examining data/zephyr-3.1.2/zwgc/zephyr.c Examining data/zephyr-3.1.2/zwgc/zephyr.h Examining data/zephyr-3.1.2/zwgc/zwgc.h FINAL RESULTS: data/zephyr-3.1.2/clients/zaway/zaway.c:110:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(awayfile,argv[optind]); data/zephyr-3.1.2/clients/zaway/zaway.c:114:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(awayfile,"%s/.away",envptr); data/zephyr-3.1.2/clients/zaway/zaway.c:120:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(awayfile,"%s/.away",pw->pw_dir); data/zephyr-3.1.2/clients/zaway/zaway.c:195:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(ptr,DEFAULT_MSG); data/zephyr-3.1.2/clients/zaway/zaway.c:225: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). (void) strcpy(sender,notice->z_sender); data/zephyr-3.1.2/clients/zaway/zaway.c:256:12: [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). (void) strcat(ptr,bfr); data/zephyr-3.1.2/clients/zctl/zctl.c:119: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(subsname,envptr); data/zephyr-3.1.2/clients/zctl/zctl.c:123: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(subsname,envptr); data/zephyr-3.1.2/clients/zctl/zctl.c:130: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(subsname,pwd->pw_dir); data/zephyr-3.1.2/clients/zctl/zctl.c:132: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(oldsubsname,subsname); data/zephyr-3.1.2/clients/zctl/zctl.c:133: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(oldsubsname,OLD_SUBS); data/zephyr-3.1.2/clients/zctl/zctl.c:134: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(subsname,USERS_SUBS); data/zephyr-3.1.2/clients/zctl/zctl.c:135:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(oldsubsname,F_OK) && access(subsname, F_OK)) { data/zephyr-3.1.2/clients/zctl/zctl.c:135:36: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(oldsubsname,F_OK) && access(subsname, F_OK)) { data/zephyr-3.1.2/clients/zctl/zctl.c:145:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ourhost, name.nodename); data/zephyr-3.1.2/clients/zctl/zctl.c:180:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(ssline+strlen(ssline),"%s ",argv[i]); data/zephyr-3.1.2/clients/zctl/zctl.c:212:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(subsname,argv[1]); data/zephyr-3.1.2/clients/zctl/zctl.c:418:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(varcat,argv[2]); data/zephyr-3.1.2/clients/zctl/zctl.c:421: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). (void) strcat(varcat,argv[i]); data/zephyr-3.1.2/clients/zctl/zctl.c:663:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(ourline,"%s,%s,%s", data/zephyr-3.1.2/clients/zctl/zctl.c:672: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). (void) strcpy(backup, subsname); data/zephyr-3.1.2/clients/zctl/zctl.c:813:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(unsubs[unind].zsub_class,subline+1); data/zephyr-3.1.2/clients/zctl/zctl.c:817:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(unsubs[unind].zsub_classinst,comma+1); data/zephyr-3.1.2/clients/zctl/zctl.c:821:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(unsubs[unind].zsub_recipient,comma2+1); data/zephyr-3.1.2/clients/zctl/zctl.c:831:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(punts[pind].zsub_class,subline+1); data/zephyr-3.1.2/clients/zctl/zctl.c:835:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(punts[pind].zsub_classinst,comma+1); data/zephyr-3.1.2/clients/zctl/zctl.c:839:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(punts[pind].zsub_recipient,comma2+1); data/zephyr-3.1.2/clients/zctl/zctl.c:847:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(subs[ind].zsub_class,subline); data/zephyr-3.1.2/clients/zctl/zctl.c:851:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(subs[ind].zsub_classinst,comma+1); data/zephyr-3.1.2/clients/zctl/zctl.c:855:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(subs[ind].zsub_recipient,comma2+1); data/zephyr-3.1.2/clients/zctl/zctl.c:1017:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(backup,file); data/zephyr-3.1.2/clients/zctl/zctl.c:1064:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(filename,F_OK)) data/zephyr-3.1.2/clients/zctl/zctl.c:1170:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s%c%s%c%s", class, '\0', inst, '\0', recip); data/zephyr-3.1.2/clients/zctl/zctl.c:1175:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s%c%s%c%s", class, '\0', inst, '\0', data/zephyr-3.1.2/clients/zleave/zleave.c:102:16: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. if ((cp = getlogin()) == NULL) { data/zephyr-3.1.2/clients/zleave/zleave.c:106:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(origlogin, cp); data/zephyr-3.1.2/clients/zleave/zleave.c:331:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(real_message,"%c%s\n%s",'\0',msg,reminder_message); data/zephyr-3.1.2/clients/zleave/zleave.c:402:11: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. l = getlogin(); data/zephyr-3.1.2/clients/zleave/zleave.c:412:7: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. char *getlogin() { data/zephyr-3.1.2/clients/zlocate/zlocate.c:134:13: [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). (void) strcat(user,ZGetRealm()); data/zephyr-3.1.2/clients/znol/znol.c:71:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(anyonename,argv[++arg]); data/zephyr-3.1.2/clients/znol/znol.c:79:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(cleanname,argv[++arg]); data/zephyr-3.1.2/clients/znol/znol.c:111: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). (void) strcpy(anyonename,envptr); data/zephyr-3.1.2/clients/znol/znol.c:117:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(anyonename,pwd->pw_dir); data/zephyr-3.1.2/clients/znol/znol.c:154:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(name,cleanname); data/zephyr-3.1.2/clients/znol/znol.c:158:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(cp,ZGetRealm()); data/zephyr-3.1.2/clients/znol/znol.c:171:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(subs[ind].zsub_classinst, "%s@%s", name, data/zephyr-3.1.2/clients/znol/znol.c:173:14: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(name, subs[ind].zsub_classinst); data/zephyr-3.1.2/clients/znol/znol.c:179:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(subs[ind++].zsub_recipient, "@%s", realm); data/zephyr-3.1.2/clients/znol/znol.c:187:14: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(subs[ind].zsub_classinst, name); data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:69:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(hostname, hp->h_name); data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:73:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(scratch, warning, hostname); data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:82: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). (void) strcpy(hn2, cp); data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:116: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). (void) strcpy(ptr, msgbuff); data/zephyr-3.1.2/clients/zstat/zstat.c:175: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). (void) strcpy(server,line[0]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:67: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). (void) strcpy(classbfr, class); data/zephyr-3.1.2/clients/zwrite/zwrite.c:74: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). (void) strcpy(instbfr, inst); data/zephyr-3.1.2/clients/zwrite/zwrite.c:82:16: [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). opcode = strcpy(opbfr, opcode); data/zephyr-3.1.2/clients/zwrite/zwrite.c:88: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). (void) strcpy(sigbfr, signature); data/zephyr-3.1.2/clients/zwrite/zwrite.c:269: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). (void) strcpy(message, signature); data/zephyr-3.1.2/clients/zwrite/zwrite.c:286:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(message+msgsize, recips[arg]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:304:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(message+msgsize, argv[arg]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:324:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(message+msgsize, bfr); data/zephyr-3.1.2/clients/zwrite/zwrite.c:367:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(realm_recip, "%s@%s", (nrecips) ? recips[i] : "", realm); data/zephyr-3.1.2/clients/zwrite/zwrite.c:373: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(dest, recips[i]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:375:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dest, "instance \"%s\"", inst); data/zephyr-3.1.2/clients/zwrite/zwrite.c:377:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dest, "class \"%s\"", class); data/zephyr-3.1.2/clients/zwrite/zwrite.c:379:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dest, "class \"%s\", instance \"%s\"", class, inst); data/zephyr-3.1.2/clients/zwrite/zwrite.c:497: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). (void) strcpy(fsinst, hp->h_name); data/zephyr-3.1.2/clients/zwrite/zwrite.c:501:10: [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). (void) strcat(fsinst, ptr); data/zephyr-3.1.2/h/sysdep.h:49:41: [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). char *getenv(), *strerror(), *ctime(), *strcpy(); data/zephyr-3.1.2/lib/ZAsyncLocate.c:54: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(zald->user,user); data/zephyr-3.1.2/lib/ZAsyncLocate.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(zald->version,notice.z_version); data/zephyr-3.1.2/lib/ZAsyncLocate.c:118: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). (void) strcpy(__locate_list[i].host, ptr); data/zephyr-3.1.2/lib/ZAsyncLocate.c:125: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). (void) strcpy(__locate_list[i].time, ptr); data/zephyr-3.1.2/lib/ZAsyncLocate.c:132: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). (void) strcpy(__locate_list[i].tty, ptr); data/zephyr-3.1.2/lib/ZAsyncLocate.c:142: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(*user,zald->user); data/zephyr-3.1.2/lib/ZAsyncLocate.c:146: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(*user,notice->z_class_inst); data/zephyr-3.1.2/lib/ZExpnRlm.c:73:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(linebuf, "%s", krb_realm) < 1) { data/zephyr-3.1.2/lib/ZExpnRlm.c:91:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(linebuf, "%s %s admin %s", krb_realm, krb_host, scratch) data/zephyr-3.1.2/lib/ZGetSender.c:61:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(sender, "%s%s%s@%s", pname, (pinst[0]?".":""), data/zephyr-3.1.2/lib/ZGetSender.c:75:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(sender, "%s@%s", pw->pw_name, __Zephyr_realm); data/zephyr-3.1.2/lib/ZInit.c:151: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(__Zephyr_realm, krealms[0]); data/zephyr-3.1.2/lib/ZInit.c:159: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(__Zephyr_realm, p); data/zephyr-3.1.2/lib/ZInit.c:169:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(__Zephyr_realm, krealm); data/zephyr-3.1.2/lib/ZInit.c:392:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(qname, "_kerberos.%s.", p); data/zephyr-3.1.2/lib/ZLocations.c:34:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(host, hostname); data/zephyr-3.1.2/lib/ZRetSubs.c:152: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(list[i].zsub_class, ptr); data/zephyr-3.1.2/lib/ZRetSubs.c:160: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(list[i].zsub_classinst, ptr); data/zephyr-3.1.2/lib/ZRetSubs.c:171: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(list[i].zsub_recipient + 1, ptr2); data/zephyr-3.1.2/lib/ZRetSubs.c:173:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(list[i].zsub_recipient, ptr2); data/zephyr-3.1.2/lib/ZVariables.c:40:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(varfile, "%s/zephyr/zephyr.vars", SYSCONFDIR); data/zephyr-3.1.2/lib/ZVariables.c:58:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(varfilebackup, varfile); data/zephyr-3.1.2/lib/ZVariables.c:96:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(varfilebackup, varfile); data/zephyr-3.1.2/lib/ZVariables.c:125:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(bfr, envptr); data/zephyr-3.1.2/lib/ZVariables.c:129:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(bfr, envptr); data/zephyr-3.1.2/lib/ZVariables.c:133:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(bfr, pwd->pw_dir); data/zephyr-3.1.2/lib/Zinternal.c:684:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(version, "%s%d.%d", ZVERSIONHDR, ZVERSIONMAJOR, data/zephyr-3.1.2/lib/Zinternal.c:733:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(version, "%s%d.%d", ZVERSIONHDR, ZVERSIONMAJOR, data/zephyr-3.1.2/lib/Zinternal.c:868:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(version_nogalaxy, "%s%d.%d", ZVERSIONHDR, data/zephyr-3.1.2/lib/Zinternal.c:921:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(newrecip, "%s@%s", notice->z_recipient, __Zephyr_realm); data/zephyr-3.1.2/lib/Zinternal.c:1021: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). (void) strcpy(*ptr, field); data/zephyr-3.1.2/lib/Zinternal.c:1204: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, args); data/zephyr-3.1.2/lib/charset.c:101:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outset_t, "%s//TRANSLIT", outset); data/zephyr-3.1.2/server/access.c:167:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(buf, F_OK)) data/zephyr-3.1.2/server/dispatch.c:1237: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 (recipient, realm); data/zephyr-3.1.2/server/kstuff.c:649: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(instance, SERVER_INSTANCE); data/zephyr-3.1.2/server/kstuff.c:656:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(srcprincipal, "%s%s%s@%s", dat.pname, dat.pinst[0] ? "." : "", data/zephyr-3.1.2/server/main.c:107:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(list_file, "%s/zephyr/%s", SYSCONFDIR, SERVER_LIST_FILE); data/zephyr-3.1.2/server/main.c:109:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(srvtab_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_SRVTAB); data/zephyr-3.1.2/server/main.c:110: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(tkt_file, ZEPHYR_TKFILE); data/zephyr-3.1.2/server/main.c:113:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keytab_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_KEYTAB); data/zephyr-3.1.2/server/main.c:114: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(tkt5_file, ZEPHYR_TK5FILE); data/zephyr-3.1.2/server/main.c:116:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(acl_dir, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_ACL_DIR); data/zephyr-3.1.2/server/main.c:117:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subs_file, "%s/zephyr/%s", SYSCONFDIR, DEFAULT_SUBS_FILE); data/zephyr-3.1.2/server/main.c:163:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(srvtab_file, R_OK) data/zephyr-3.1.2/server/main.c:353:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(env, "KRB5CCNAME=%s", tkt5_file); data/zephyr-3.1.2/server/main.c:361: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(__Zephyr_realm, my_realm); data/zephyr-3.1.2/server/main.c:518:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%szephyr.strings", TEMP_DIRECTORY); data/zephyr-3.1.2/server/main.c:557:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%szephyr.db", TEMP_DIRECTORY); data/zephyr-3.1.2/server/realm.c:109:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rlm_recipient, "@%s", realm->name); data/zephyr-3.1.2/server/realm.c:354:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buf, "%s %s", realm, server) != 2) { data/zephyr-3.1.2/server/realm.c:634:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rlm_recipient, "@%s", realm->name); data/zephyr-3.1.2/server/realm.c:644:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rlm_recipient, "@%s", realm->name); data/zephyr-3.1.2/server/realm.c:672:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(realm_list_file, "%s/zephyr/%s", SYSCONFDIR, REALM_LIST_FILE); data/zephyr-3.1.2/server/realm.c:852:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rlm_recipient, "@%s", realm->name); data/zephyr-3.1.2/server/server.c:759:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/%s%s", otherservers[i].addr_str, data/zephyr-3.1.2/server/server.c:766:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s(%s)/%s", realm->name, data/zephyr-3.1.2/server/server.c:938: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(server->addr_str, inet_ntoa(*addr)); data/zephyr-3.1.2/server/subscr.c:802: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(addr, inet_ntoa(who->addr.sin_addr)); data/zephyr-3.1.2/server/subscr.c:1001: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, realm->name); data/zephyr-3.1.2/server/subscr.c:1301:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rlm_recipient, "@%s", realm->name); data/zephyr-3.1.2/server/version.c:40: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(vers_buf, version); data/zephyr-3.1.2/server/version.c:45:14: [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). (void) strcat(vers_buf, un.machine); data/zephyr-3.1.2/server/version.c:47:14: [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). (void) strcat(vers_buf, un.sysname); data/zephyr-3.1.2/server/zserver.h:524:31: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. #define zdbug(s1) if (zdebug) syslog s1; data/zephyr-3.1.2/zhm/zhm.c:78:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(PidFile, "%szhm.pid", PIDDIR); data/zephyr-3.1.2/zhm/zhm.c:300: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(zcluster, c+1); data/zephyr-3.1.2/zhm/zhm.c:543: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(list[0], cur_serv); data/zephyr-3.1.2/zhm/zhm.c:587:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(version, "%s%d.%d", ZVERSIONHDR, ZVERSIONMAJOR, data/zephyr-3.1.2/zhm/zhm.h:37:16: [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 DPR(a) fprintf(stderr, a); fflush(stderr) data/zephyr-3.1.2/zhm/zhm.h:38:19: [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 DPR2(a,b) fprintf(stderr, a, b); fflush(stderr) data/zephyr-3.1.2/zwgc/X_driver.c:273:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbasename, "%s/zephyr/zwgc_resources", DATADIR); data/zephyr-3.1.2/zwgc/error.h:44: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(stderr, a);\ data/zephyr-3.1.2/zwgc/error.h:48: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(stderr, a, b);\ data/zephyr-3.1.2/zwgc/error.h:52: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(stderr, a, b, c);\ data/zephyr-3.1.2/zwgc/error.h:56: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(stderr, a, b, c, d);\ data/zephyr-3.1.2/zwgc/exec.c:347:2: [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(argv[0], argv); data/zephyr-3.1.2/zwgc/main.c:147:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msgbuf,"Zwgc mark II version %s now running...", data/zephyr-3.1.2/zwgc/main.c:172:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(defdesc, "%s/zephyr/%s", DATADIR, DEFDESC); data/zephyr-3.1.2/zwgc/main.c:231:14: [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. status = system(iprogname); data/zephyr-3.1.2/zwgc/main.c:378: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(new_message, punt_reply.z_message); data/zephyr-3.1.2/zwgc/main.c:384: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 (punt_reply.z_message, punt_ent->key); data/zephyr-3.1.2/zwgc/plus.c:97:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "time-%s", event->event_name); data/zephyr-3.1.2/zwgc/plus.c:133: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, name); data/zephyr-3.1.2/zwgc/plus.c:234: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(pt->hname, hname); data/zephyr-3.1.2/zwgc/plus.c:470:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-space", tmp); data/zephyr-3.1.2/zwgc/plus.c:472:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-delete", tmp); data/zephyr-3.1.2/zwgc/plus.c:474:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-ctrl-@", tmp); data/zephyr-3.1.2/zwgc/plus.c:476:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-esc", tmp); data/zephyr-3.1.2/zwgc/plus.c:478:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-%c", tmp, ch); data/zephyr-3.1.2/zwgc/plus.c:480:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-ctrl-%c", tmp, ch+'a'-1); data/zephyr-3.1.2/zwgc/plus.c:482:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-ctrl-%c", tmp, ch+'A'-1); data/zephyr-3.1.2/zwgc/plus.c:484:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "key%s-unknown", tmp); data/zephyr-3.1.2/zwgc/port.c:466:2: [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(argv[0], argv); data/zephyr-3.1.2/zwgc/subscriptions.c:265:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, ZGetSender()); data/zephyr-3.1.2/zwgc/subscriptions.c:267:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, ourhost); data/zephyr-3.1.2/zwgc/subscriptions.c:269:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, ourhostcanon); data/zephyr-3.1.2/zwgc/subscriptions.c:297:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(temp,"%[^,],%[^,],%s", class, instance, recipient); data/zephyr-3.1.2/zwgc/xshow.c:678: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(class_nm, notice->z_sender); data/zephyr-3.1.2/zwgc/xshow.c:696: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(class_nm, notice->z_sender); data/zephyr-3.1.2/zwgc/xshow.c:713: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(recip_nm, notice->z_recipient); data/zephyr-3.1.2/zwgc/xshow.c:730: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(recip_nm, notice->z_recipient); data/zephyr-3.1.2/zwgc/xshow.c:747: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(class_nm, notice->z_class); data/zephyr-3.1.2/zwgc/xshow.c:748: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(instance_nm, notice->z_class_inst); data/zephyr-3.1.2/zwgc/xshow.c:749: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(recip_nm, notice->z_recipient); data/zephyr-3.1.2/zwgc/xshow.c:769: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(class_nm, notice->z_class); data/zephyr-3.1.2/zwgc/xshow.c:770: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(instance_nm, notice->z_class_inst); data/zephyr-3.1.2/zwgc/xshow.c:789: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(class_nm, notice->z_class); data/zephyr-3.1.2/zwgc/xshow.c:790: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(recip_nm, notice->z_recipient); data/zephyr-3.1.2/zwgc/xshow.c:809: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(class_nm, notice->z_class); data/zephyr-3.1.2/zwgc/zwgc.h:20:40: [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. #define dprintf(x) if (zwgc_debug) printf(x) data/zephyr-3.1.2/zwgc/zwgc.h:21:43: [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. #define dprintf1(x,y) if (zwgc_debug) printf(x,y) data/zephyr-3.1.2/clients/zaway/zaway.c:80:20: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((optchar = getopt(argc, argv, "m:whx:")) != EOF) { data/zephyr-3.1.2/clients/zaway/zaway.c:112:12: [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. envptr = getenv("HOME"); data/zephyr-3.1.2/clients/zctl/zctl.c:112:8: [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. tty = getenv("DISPLAY"); data/zephyr-3.1.2/clients/zctl/zctl.c:117: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. envptr = getenv("ZEPHYR_SUBS"); data/zephyr-3.1.2/clients/zctl/zctl.c:121:12: [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. envptr = getenv("HOME"); data/zephyr-3.1.2/clients/znol/znol.c:109: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. envptr = getenv("HOME"); data/zephyr-3.1.2/clients/zstat/zstat.c:83:20: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((optchar = getopt(argc, argv, "sh")) != EOF) { data/zephyr-3.1.2/h/sysdep.h:49: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. char *getenv(), *strerror(), *ctime(), *strcpy(); data/zephyr-3.1.2/h/sysdep.h:51:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ZEPHYR_INT32 random(); data/zephyr-3.1.2/h/sysdep.h:56:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random lrand48 data/zephyr-3.1.2/h/sysdep.h:56:16: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random lrand48 data/zephyr-3.1.2/h/sysdep.h:57:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand48 data/zephyr-3.1.2/h/sysdep.h:59:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random rand data/zephyr-3.1.2/h/sysdep.h:60:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand data/zephyr-3.1.2/h/sysdep.h:60:17: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand data/zephyr-3.1.2/lib/ZGetWGPort.c:26: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. envptr = getenv("WGFILE"); data/zephyr-3.1.2/lib/ZVariables.c:123: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. envptr = getenv("ZEPHYR_VARS"); data/zephyr-3.1.2/lib/ZVariables.c:127:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. envptr = getenv("HOME"); data/zephyr-3.1.2/lib/charset.c:33:12: [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. charset = getenv("ZEPHYR_CHARSET"); data/zephyr-3.1.2/server/dispatch.c:1148:8: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. s = (random() % (nservers - 1)) + 1; data/zephyr-3.1.2/server/dispatch.c:1173:7: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. s = (random() % (nservers - 1)) + 1; data/zephyr-3.1.2/server/main.c:124:23: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((optchar = getopt(argc, argv, "dsnv4f:k:")) != EOF) { data/zephyr-3.1.2/server/main.c:211:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(getpid() ^ time(0)); data/zephyr-3.1.2/server/realm.c:821:34: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. realm_next_idx_by_idx(rlm, (random() % rlm->count)) : 0; data/zephyr-3.1.2/zhm/zhm.c:23:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand48 data/zephyr-3.1.2/zhm/zhm.c:85:19: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "drhinfN")) != EOF) data/zephyr-3.1.2/zhm/zhm.c:355:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(time(NULL)); data/zephyr-3.1.2/zhm/zhm.c:356:31: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. strncpy(prim_serv, serv_list[random() % numserv], sizeof(prim_serv)); data/zephyr-3.1.2/zhm/zhm_server.c:152:25: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. new_serv = serv_list[random() % numserv]; data/zephyr-3.1.2/zwgc/X_driver.c:303:16: [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. filename = getenv("XENVIRONMENT"); data/zephyr-3.1.2/zwgc/X_gram.c:214:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!(temp=(char *) getenv("RESOURCE_NAME"))) data/zephyr-3.1.2/zwgc/browser.c:37: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. if (temp=getenv("WGSOCK")) data/zephyr-3.1.2/zwgc/eval.c:171:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. result = getenv(first); data/zephyr-3.1.2/zwgc/file.c:48: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. result = getenv("HOME"); data/zephyr-3.1.2/zwgc/tty_filter.c:56:25: [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 *tgetstr(),*getenv(); data/zephyr-3.1.2/zwgc/tty_filter.c:123: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. if (!(term = getenv("TERM"))) { /* Only use termcap if $TERM. */ data/zephyr-3.1.2/zwgc/zephyr.c:70:12: [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. temp = getenv("WGFILE"); data/zephyr-3.1.2/clients/zaway/zaway.c:52: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 awayfile[BUFSIZ],*msg[2],*envptr; data/zephyr-3.1.2/clients/zaway/zaway.c:124: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). fp = fopen(awayfile,"r"); data/zephyr-3.1.2/clients/zaway/zaway.c:220: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 bfr[BUFSIZ],sender[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:49: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 subsname[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:50: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 ourhost[NS_MAXDNAME], ourhostcanon[NS_MAXDNAME]; data/zephyr-3.1.2/clients/zctl/zctl.c:97: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 ssline[BUFSIZ],oldsubsname[BUFSIZ],*envptr,*tty = NULL; data/zephyr-3.1.2/clients/zctl/zctl.c:373: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 *newargv[1]; data/zephyr-3.1.2/clients/zctl/zctl.c:374: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 varcat[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:597: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). if (!(fp = fopen(subsname,"a"))) { data/zephyr-3.1.2/clients/zctl/zctl.c:648: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 subline[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:649: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 backup[BUFSIZ],ourline[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:668: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). if (!(fp = fopen(subsname,"r"))) { data/zephyr-3.1.2/clients/zctl/zctl.c:673:9: [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. (void) strcat(backup, ".temp"); data/zephyr-3.1.2/clients/zctl/zctl.c:675:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fpout = fopen(backup,"w"))) { data/zephyr-3.1.2/clients/zctl/zctl.c:732: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 *comma,*comma2,*file,subline[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:756: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). fp = fopen(file,"r"); data/zephyr-3.1.2/clients/zctl/zctl.c:974: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 backup[BUFSIZ]; data/zephyr-3.1.2/clients/zctl/zctl.c:1018:10: [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. (void) strcat(backup,".temp"); data/zephyr-3.1.2/clients/zctl/zctl.c:1019: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). if (!(fp = fopen(backup,"w"))) { data/zephyr-3.1.2/clients/zctl/zctl.c:1067:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fpout = fopen(filename,"w"))) { data/zephyr-3.1.2/clients/zctl/zctl.c:1139:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (!strcmp((char *)ZGetRealm(), (char *)ZExpandRealm(argv[3]+2))) data/zephyr-3.1.2/clients/zctl/zctl.c:1139:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (!strcmp((char *)ZGetRealm(), (char *)ZExpandRealm(argv[3]+2))) data/zephyr-3.1.2/clients/zctl/zctl.c:1277: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. const char *names[MAXNAMES]; data/zephyr-3.1.2/clients/zleave/zleave.c:51: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 origlogin[20]; data/zephyr-3.1.2/clients/zleave/zleave.c:52: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 tempfile[40]; data/zephyr-3.1.2/clients/zleave/zleave.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 buff[100]; data/zephyr-3.1.2/clients/zleave/zleave.c:81:9: [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. (void) sprintf(tempfile, "/tmp/zleave.%d", (int) getuid()); data/zephyr-3.1.2/clients/zleave/zleave.c:141: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 (!(fp = fopen(tempfile,"r"))) { data/zephyr-3.1.2/clients/zleave/zleave.c:255: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). fp = fopen(tempfile,"r"); data/zephyr-3.1.2/clients/zleave/zleave.c:277: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). if (!(fp = fopen(tempfile, "w"))) data/zephyr-3.1.2/clients/zleave/zleave.c:418: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). ufd = open("/etc/utmp",0); data/zephyr-3.1.2/clients/zlocate/zlocate.c:74: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 user[BUFSIZ],*whichuser; data/zephyr-3.1.2/clients/znol/znol.c:35: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 anyonename[BUFSIZ],name[BUFSIZ],cleanname[BUFSIZ],*envptr; data/zephyr-3.1.2/clients/znol/znol.c:119:11: [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. (void) strcat(anyonename,"/.anyone"); data/zephyr-3.1.2/clients/znol/znol.c:125:21: [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 if (!(fp = fopen(anyonename,"r"))) { data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:52: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 hostname[NS_MAXDNAME]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:53: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 msgbuff[BUFSIZ], message[Z_MAXPKTLEN], *ptr; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:54: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 scratch[BUFSIZ]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:55: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 *msg[N_FIELD_CNT]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:57: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 tkt_filename[MAXPATHLEN]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:58: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 rlm[REALM_SZ]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:59: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 hn2[NS_MAXDNAME]; data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:77:12: [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. (void) sprintf(tkt_filename, "/tmp/tkt_zshut_%d", getpid()); data/zephyr-3.1.2/clients/zstat/zstat.c:69: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 hostname[NS_MAXDNAME]; data/zephyr-3.1.2/clients/zstat/zstat.c:124: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 srv_host[NS_MAXDNAME]; data/zephyr-3.1.2/clients/zstat/zstat.c:145: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[20],*mp; data/zephyr-3.1.2/clients/zstat/zstat.c:157:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *) &inaddr, hp->h_addr, hp->h_length); data/zephyr-3.1.2/clients/zstat/zstat.c:181:14: [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). runtime = atol(line[i]); data/zephyr-3.1.2/clients/zstat/zstat.c:202: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[20],*mp; data/zephyr-3.1.2/clients/zstat/zstat.c:229:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *) &sin.sin_addr, hp->h_addr, hp->h_length); data/zephyr-3.1.2/clients/zstat/zstat.c:291:14: [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). runtime = atol(line[i]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:32: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 *whoami, *inst, *class, *opcode, *realm, *recips[MAXRECIPS], *sender = 0; data/zephyr-3.1.2/clients/zwrite/zwrite.c:46:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char bfr[BUFSIZ], classbfr[BUFSIZ], instbfr[BUFSIZ], sigbfr[BUFSIZ]; data/zephyr-3.1.2/clients/zwrite/zwrite.c:47:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char opbfr[BUFSIZ]; data/zephyr-3.1.2/clients/zwrite/zwrite.c:283:9: [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. (void) strcpy(message+msgsize, "CC: "); data/zephyr-3.1.2/clients/zwrite/zwrite.c:338:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(message+msgsize, bfr, nchars); data/zephyr-3.1.2/clients/zwrite/zwrite.c:360: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 realm_recip[BUFSIZ], dest[3 * BUFSIZ]; data/zephyr-3.1.2/clients/zwrite/zwrite.c:483: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 fsinst[BUFSIZ]; data/zephyr-3.1.2/h/sysdep.h:79:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) bcopy ((s), (d), (n)) data/zephyr-3.1.2/h/sysdep.h:79:27: [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 memcpy(d, s, n) bcopy ((s), (d), (n)) data/zephyr-3.1.2/h/sysdep.h:83:28: [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 memmove(d, s, n) bcopy ((s), (d), (n)) data/zephyr-3.1.2/h/zephyr/zephyr.h:59: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. typedef char ZPacket_t[Z_MAXPKTLEN]; data/zephyr-3.1.2/h/zephyr/zephyr.h:66:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char * const ZNoticeKinds[9]; data/zephyr-3.1.2/h/zephyr/zephyr.h:114: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 *z_other_fields[Z_MAXOTHERFIELDS]; data/zephyr-3.1.2/lib/ZCkIfNot.c:42:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer, qptr->packet, qptr->packet_len); data/zephyr-3.1.2/lib/ZCkZAut.c:131: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(cksum_data, cksum0_base, cksum0_len); data/zephyr-3.1.2/lib/ZCkZAut.c:133:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cksum_data + cksum0_len, cksum1_base, cksum1_len); data/zephyr-3.1.2/lib/ZCkZAut.c:134: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(cksum_data + cksum0_len + cksum1_len, data/zephyr-3.1.2/lib/ZDumpSession.c:61:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, key->keyblock->contents, key->keyblock->length); data/zephyr-3.1.2/lib/ZDumpSession.c:118:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)key->keyblock->contents, buffer, keylength); data/zephyr-3.1.2/lib/ZExpnRlm.c:9:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char expand[REALM_SZ]; data/zephyr-3.1.2/lib/ZExpnRlm.c:50: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 krb_host[NS_MAXDNAME + 1]; data/zephyr-3.1.2/lib/ZExpnRlm.c:51:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char krb_realm[REALM_SZ+1]; data/zephyr-3.1.2/lib/ZExpnRlm.c:52: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 linebuf[BUFSIZ]; data/zephyr-3.1.2/lib/ZExpnRlm.c:53: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 scratch[64]; data/zephyr-3.1.2/lib/ZExpnRlm.c:63: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). if ((rlm_file = fopen("/etc/krb.conf", "r")) == (FILE *) 0) { data/zephyr-3.1.2/lib/ZFmtAuth.c:52:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ptr, newnotice.z_message, newnotice.z_message_len); data/zephyr-3.1.2/lib/ZFmtAuth.c:94:10: [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(&tmp, Z_keydata(keyblock), key_len); data/zephyr-3.1.2/lib/ZFmtAuth.c:125:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ptr, newnotice.z_message, newnotice.z_message_len); data/zephyr-3.1.2/lib/ZFmtList.c:28: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZFmtList.c:48:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, header, hdrlen); data/zephyr-3.1.2/lib/ZFmtList.c:54:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ptr, *list, i); data/zephyr-3.1.2/lib/ZFmtNotice.c:25: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZFmtNotice.c:39:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, header, hdrlen); data/zephyr-3.1.2/lib/ZFmtNotice.c:40:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer+hdrlen, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/ZFmtNotice.c:51: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZFmtNotice.c:65:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, header, hdrlen); data/zephyr-3.1.2/lib/ZFmtNotice.c:66:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer+hdrlen, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/ZFmtRaw.c: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZFmtRaw.c:38:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, header, hdrlen); data/zephyr-3.1.2/lib/ZFmtRaw.c:39:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer+hdrlen, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/ZFmtRawLst.c:26: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZFmtRawLst.c:44:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, header, hdrlen); data/zephyr-3.1.2/lib/ZFmtRawLst.c:50:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ptr, *list, i); data/zephyr-3.1.2/lib/ZFmtSmRLst.c:47:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ptr, *list, i); data/zephyr-3.1.2/lib/ZFmtSmRaw.c:36:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer+hdrlen, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/ZFmtSmRaw.c:59:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer+hdrlen, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/ZGetSender.c:34: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 pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ]; data/zephyr-3.1.2/lib/ZGetWGPort.c:22: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 *envptr, name[128]; data/zephyr-3.1.2/lib/ZGetWGPort.c:28:9: [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. (void) sprintf(name, "/tmp/wg.%d", getuid()); data/zephyr-3.1.2/lib/ZGetWGPort.c:31:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fp = fopen(envptr, "r"))) data/zephyr-3.1.2/lib/ZIfNotice.c:43:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer, qptr->packet, qptr->packet_len); data/zephyr-3.1.2/lib/ZInit.c:51: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 addr[4], hostname[NS_MAXDNAME]; data/zephyr-3.1.2/lib/ZInit.c:64: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 d1[ANAME_SZ], d2[INST_SZ]; data/zephyr-3.1.2/lib/ZInit.c:98:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&__HM_addr.sin_addr, addr, 4); data/zephyr-3.1.2/lib/ZInit.c:176: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(__Zephyr_realm, "local-realm"); data/zephyr-3.1.2/lib/ZInit.c:190:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sin.sin_addr, &servaddr, sizeof(servaddr)); data/zephyr-3.1.2/lib/ZInit.c:248: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 dname[NS_MAXDNAME]; data/zephyr-3.1.2/lib/ZInit.c:314:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*result, p + 1, ret - 1); data/zephyr-3.1.2/lib/ZLocations.c:23: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 host[NS_MAXDNAME], *mytty = "space"; data/zephyr-3.1.2/lib/ZLocations.c:125: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 *bptr[3]; data/zephyr-3.1.2/lib/ZMakeZcode.c:25: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 buf[4]; data/zephyr-3.1.2/lib/ZMkAuth.c:316:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*creds_out, &creds_tmp, sizeof(creds_tmp)); data/zephyr-3.1.2/lib/ZParseNot.c:79:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). maj = atoi(ptr); data/zephyr-3.1.2/lib/ZParseNot.c:244:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char addrbuf[sizeof(notice->z_sender_sockaddr.ip6.sin6_addr)]; data/zephyr-3.1.2/lib/ZParseNot.c:264:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(¬ice->z_sender_sockaddr.ip6.sin6_addr, addrbuf, alen); data/zephyr-3.1.2/lib/ZParseNot.c:270:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(¬ice->z_sender_sockaddr.ip4.sin_addr, addrbuf, alen); data/zephyr-3.1.2/lib/ZPeekIfNot.c:42:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer, qptr->packet, qptr->packet_len); data/zephyr-3.1.2/lib/ZPeekPkt.c:37:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(*buffer, nextq->packet, *ret_len); data/zephyr-3.1.2/lib/ZReadAscii.c:64: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 buf[4]; data/zephyr-3.1.2/lib/ZReadAscii.c:79: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 buf[2]; data/zephyr-3.1.2/lib/ZRecvNot.c:43:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer, nextq->packet, len); data/zephyr-3.1.2/lib/ZRecvPkt.c:36:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer, nextq->packet, *ret_len); data/zephyr-3.1.2/lib/ZRetSubs.c:30: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 asciiport[50]; data/zephyr-3.1.2/lib/ZSubs.c:84: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 header[Z_MAXHEADERLEN]; data/zephyr-3.1.2/lib/ZVariables.c:30: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 varfile[128], *ret; data/zephyr-3.1.2/lib/ZVariables.c:49: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 varfile[128], varfilebackup[128], varbfr[512]; data/zephyr-3.1.2/lib/ZVariables.c:59:12: [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. (void) strcat(varfilebackup, ".backup"); data/zephyr-3.1.2/lib/ZVariables.c:61: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 (!(fpout = fopen(varfilebackup, "w"))) data/zephyr-3.1.2/lib/ZVariables.c:63: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 ((fpin = fopen(varfile, "r")) != NULL) { data/zephyr-3.1.2/lib/ZVariables.c:89: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 varfile[128], varfilebackup[128], varbfr[512]; data/zephyr-3.1.2/lib/ZVariables.c:97:12: [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. (void) strcat(varfilebackup, ".backup"); data/zephyr-3.1.2/lib/ZVariables.c:99: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 (!(fpout = fopen(varfilebackup, "w"))) data/zephyr-3.1.2/lib/ZVariables.c:101: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 ((fpin = fopen(varfile, "r")) != NULL) { data/zephyr-3.1.2/lib/ZVariables.c:137:9: [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. (void) strcat(bfr, ".zephyr.vars"); data/zephyr-3.1.2/lib/ZVariables.c:146:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char varbfr[512]; data/zephyr-3.1.2/lib/ZVariables.c:149: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(fn, "r"); data/zephyr-3.1.2/lib/Zinternal.c:104: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 __Zephyr_realm[REALM_SZ]; data/zephyr-3.1.2/lib/Zinternal.c:371:9: [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). part = atoi(notice.z_multinotice); data/zephyr-3.1.2/lib/Zinternal.c:372:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). partof = atoi(slash+1); data/zephyr-3.1.2/lib/Zinternal.c:433:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->header, packet, qptr->header_len); data/zephyr-3.1.2/lib/Zinternal.c:483:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->header, packet, qptr->header_len); data/zephyr-3.1.2/lib/Zinternal.c:501:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->msg, notice.z_message, notice.z_message_len); data/zephyr-3.1.2/lib/Zinternal.c:507:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->packet, qptr->header, qptr->header_len); data/zephyr-3.1.2/lib/Zinternal.c:509:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->packet+qptr->header_len, qptr->msg, data/zephyr-3.1.2/lib/Zinternal.c:570:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->msg+part, notice->z_message, notice->z_message_len); data/zephyr-3.1.2/lib/Zinternal.c:623:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->packet, qptr->header, qptr->header_len); data/zephyr-3.1.2/lib/Zinternal.c:624:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(qptr->packet+qptr->header_len, qptr->msg, data/zephyr-3.1.2/lib/Zinternal.c:649:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char version[BUFSIZ]; /* default init should be all \0 */ data/zephyr-3.1.2/lib/Zinternal.c:669:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(¬ice->z_uid.zuid_addr, &__My_addr, sizeof(__My_addr)); data/zephyr-3.1.2/lib/Zinternal.c:675:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(¬ice->z_sender_sockaddr.ip4.sin_addr, &__My_addr, sizeof(__My_addr)); data/zephyr-3.1.2/lib/Zinternal.c:699:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char version[BUFSIZ]; /* default init should be all \0 */ data/zephyr-3.1.2/lib/Zinternal.c:720:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(¬ice->z_uid.zuid_addr, &__My_addr, sizeof(__My_addr)); data/zephyr-3.1.2/lib/Zinternal.c:725:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(¬ice->z_sender_sockaddr.ip4.sin_addr, &__My_addr, sizeof(__My_addr)); data/zephyr-3.1.2/lib/Zinternal.c:836:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char version_nogalaxy[BUFSIZ]; /* default init should be all \0 */ data/zephyr-3.1.2/lib/Zinternal.c:837: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 newrecip[BUFSIZ]; data/zephyr-3.1.2/lib/Zinternal.c:1115: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 multi[64]; data/zephyr-3.1.2/lib/Zinternal.c:1130:9: [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. (void) sprintf(multi, "%d/%d", offset, notice->z_message_len); data/zephyr-3.1.2/lib/Zinternal.c:1139:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&partnotice.z_uid.zuid_addr, &__My_addr, data/zephyr-3.1.2/lib/Zinternal.c:1144:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(¬ice->z_sender_sockaddr.ip4.sin_addr, &__My_addr, sizeof(__My_addr)); data/zephyr-3.1.2/lib/Zinternal.c:1156:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer + ret_len, partnotice.z_message, message_len); data/zephyr-3.1.2/lib/Zinternal.c:1275: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(*asn1_data, data, len); data/zephyr-3.1.2/lib/Zinternal.c:1325:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cksum_data, cksum_start, cksum0_len); data/zephyr-3.1.2/lib/Zinternal.c:1326:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cksum_data + cksum0_len, cend, cksum1_len); data/zephyr-3.1.2/lib/Zinternal.c:1327:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cksum_data + cksum0_len + cksum1_len, data/zephyr-3.1.2/lib/Zinternal.c:1353:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cstart + zcode_len, cksum_data + cksum0_len, cksum1_len); data/zephyr-3.1.2/lib/smwgc.c:9:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512],*ptr; data/zephyr-3.1.2/lib/smwgc.c:27: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,"/tmp/wg.%d",getuid()); data/zephyr-3.1.2/lib/smwgc.c:28: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(buf,"w"); data/zephyr-3.1.2/server/access.c:69:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; /* holds the real acl name */ data/zephyr-3.1.2/server/access.c:114:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; /* holds the real acl name */ data/zephyr-3.1.2/server/access.c:146:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; /* holds the real acl name */ data/zephyr-3.1.2/server/access.c:184:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/zephyr-3.1.2/server/access.c:185: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 class_name[512]; /* assume class names <= 511 bytes */ data/zephyr-3.1.2/server/access.c:193: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). registry = fopen(buf, "r"); data/zephyr-3.1.2/server/acl_files.c:225:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/zephyr-3.1.2/server/acl_files.c:260: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). if ((f = fopen(name, "r")) == NULL) { data/zephyr-3.1.2/server/bdump.c:121:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512], *addr, *lyst[2]; data/zephyr-3.1.2/server/bdump.c:189: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", ntohs(bdump_sin.sin_port)); data/zephyr-3.1.2/server/bdump.c:236: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 instance [INST_SZ]; data/zephyr-3.1.2/server/bdump.c:1017:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[INST_SZ + 1] = SERVER_INSTANCE; data/zephyr-3.1.2/server/bdump.c:1188: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 buf[512]; data/zephyr-3.1.2/server/bdump.c:1194: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 cblock[8]; data/zephyr-3.1.2/server/bdump.c:1238:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(packet, out.data, out.length); data/zephyr-3.1.2/server/bdump.c:1284: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). notice.z_port = htons((u_short) atoi(notice.z_message)); data/zephyr-3.1.2/server/bdump.c:1329:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&client_enctype, &buf[0], sizeof(uint32_t)); data/zephyr-3.1.2/server/bdump.c:1330:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&client_keysize, &buf[4], sizeof(uint32_t)); data/zephyr-3.1.2/server/bdump.c:1341:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Z_keydata(client->session_keyblock), &buf[8], data/zephyr-3.1.2/server/bdump.c:1598:46: [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). target->sin_port = htons((unsigned short)atoi(cp)); data/zephyr-3.1.2/server/dispatch.c:309: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 recipbuf[MAX_PRINCIPAL_SIZE], *recipp, *acl_sender; data/zephyr-3.1.2/server/dispatch.c:504: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(savebuf, buf, len); data/zephyr-3.1.2/server/dispatch.c:568:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char multi[64]; data/zephyr-3.1.2/server/dispatch.c:616:20: [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. (void) sprintf(multi, "%d/%d", offset+origoffset, origlen); data/zephyr-3.1.2/server/dispatch.c:624:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&partnotice.z_uid.zuid_addr, &__My_addr, data/zephyr-3.1.2/server/dispatch.c:627:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&partnotice.z_sender_sockaddr.ip4.sin_addr, data/zephyr-3.1.2/server/dispatch.c:642:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer + hdrlen, partnotice.z_message, data/zephyr-3.1.2/server/dispatch.c:1047:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(client->session_key, ZGetSession(), sizeof(C_Block)); data/zephyr-3.1.2/server/dispatch.c:1236: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 (recipient, "hm@"); data/zephyr-3.1.2/server/global.c:33: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 myname[NS_MAXDNAME]; /* my host name */ data/zephyr-3.1.2/server/global.c:35: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 list_file[128]; data/zephyr-3.1.2/server/global.c:37: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 keytab_file[128]; data/zephyr-3.1.2/server/global.c:40: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 srvtab_file[128]; data/zephyr-3.1.2/server/global.c:42:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char acl_dir[128]; data/zephyr-3.1.2/server/global.c:43: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 subs_file[128]; data/zephyr-3.1.2/server/kstuff.c:46: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[20]; data/zephyr-3.1.2/server/kstuff.c:49: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 instance[INST_SZ]; data/zephyr-3.1.2/server/kstuff.c:66:21: [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). ticket.length = atoi(p); data/zephyr-3.1.2/server/kstuff.c:107: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[32]; data/zephyr-3.1.2/server/kstuff.c:115:12: [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. (void) sprintf(p,"%d ",ticket->length); data/zephyr-3.1.2/server/kstuff.c:131: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[20]; data/zephyr-3.1.2/server/kstuff.c:153:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (!strncmp(p, "V5-", 3) && (len = atoi(p+3)) > 0) data/zephyr-3.1.2/server/kstuff.c:155:21: [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 if ((len = atoi(p)) > 0) data/zephyr-3.1.2/server/kstuff.c:192: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[20]; data/zephyr-3.1.2/server/kstuff.c:207:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (i == 20 || strncmp(p, "V5-", 3) || !atoi(p+3)) { data/zephyr-3.1.2/server/kstuff.c:211:20: [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). data->length = atoi(p+3); data/zephyr-3.1.2/server/kstuff.c:231: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[32]; data/zephyr-3.1.2/server/kstuff.c:233: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(p, "V5-%lu ", (unsigned long)data->length); data/zephyr-3.1.2/server/kstuff.c:277: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 rlmprincipal[MAX_PRINCIPAL_SIZE]; data/zephyr-3.1.2/server/kstuff.c:559: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(cksum_data, cksum0_base, cksum0_len); data/zephyr-3.1.2/server/kstuff.c:561:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cksum_data + cksum0_len, cksum1_base, cksum1_len); data/zephyr-3.1.2/server/kstuff.c:562: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(cksum_data + cksum0_len + cksum1_len, data/zephyr-3.1.2/server/kstuff.c:627: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 srcprincipal[ANAME_SZ+INST_SZ+REALM_SZ+4]; data/zephyr-3.1.2/server/kstuff.c:631: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 instance[INST_SZ+1]; data/zephyr-3.1.2/server/kstuff.c:762:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Z_keydata(__Zephyr_keyblock), key, sizeof(C_Block)); data/zephyr-3.1.2/server/kstuff.c:764: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(__Zephyr_session, key, sizeof(C_Block)); data/zephyr-3.1.2/server/main.c:77: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 tkt5_file[256]; data/zephyr-3.1.2/server/main.c:80: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 tkt_file[128]; data/zephyr-3.1.2/server/main.c:89: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 my_realm[REALM_SZ]; data/zephyr-3.1.2/server/main.c:397: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 hostname[NS_MAXDNAME]; data/zephyr-3.1.2/server/main.c:422: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(&my_addr, hp->h_addr_list[0], hp->h_length); data/zephyr-3.1.2/server/main.c:513: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[128]; data/zephyr-3.1.2/server/main.c:519: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, "w"); data/zephyr-3.1.2/server/main.c:550: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[128]; data/zephyr-3.1.2/server/main.c:558: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, "w"); data/zephyr-3.1.2/server/main.c:688: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). i = open("/dev/tty", O_RDWR, 666); data/zephyr-3.1.2/server/realm.c:95: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 rlm_recipient[REALM_SZ + 1]; data/zephyr-3.1.2/server/realm.c:337:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[REALM_SZ + NS_MAXDNAME + 1]; /* one for newline */ data/zephyr-3.1.2/server/realm.c:338: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 realm[REALM_SZ], server[NS_MAXDNAME + 1]; data/zephyr-3.1.2/server/realm.c:342:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fp = fopen(file, "r"))) data/zephyr-3.1.2/server/realm.c:608: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 rlm_recipient[REALM_SZ + 1]; data/zephyr-3.1.2/server/realm.c:669: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 realm_list_file[128]; data/zephyr-3.1.2/server/realm.c:670: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 rlmprinc[MAX_PRINCIPAL_SIZE]; data/zephyr-3.1.2/server/realm.c:840: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 rlm_recipient[REALM_SZ + 1]; data/zephyr-3.1.2/server/realm.c:1327: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 multi[64]; data/zephyr-3.1.2/server/realm.c:1399:12: [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. (void)sprintf(multi, "%d/%d", offset+origoffset, origlen); data/zephyr-3.1.2/server/realm.c:1408:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *)&partnotice.z_uid.zuid_addr, &__My_addr, data/zephyr-3.1.2/server/realm.c:1411:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *)&partnotice.z_sender_sockaddr.ip4.sin_addr, data/zephyr-3.1.2/server/realm.c:1435:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buffer + hdrlen, partnotice.z_message, data/zephyr-3.1.2/server/realm.c:1464:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(buffer + hdrlen, newnotice.z_message, data/zephyr-3.1.2/server/server.c:528:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512], *lyst[2]; data/zephyr-3.1.2/server/server.c:536: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", ntohs(client->addr.sin_port)); data/zephyr-3.1.2/server/server.c:626:54: [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). who->sin_port = notice->z_port = htons((u_short) atoi(cp)); data/zephyr-3.1.2/server/server.c:731:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/zephyr-3.1.2/server/server.c:744: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, "%lu pkts", npackets); data/zephyr-3.1.2/server/server.c:746: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, "%ld seconds operational",NOW - uptime); data/zephyr-3.1.2/server/server.c:825:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(addr, hp->h_addr, sizeof(struct in_addr)); data/zephyr-3.1.2/server/server.c:848:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NS_MAXDNAME]; data/zephyr-3.1.2/server/server.c:853: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(file, "r"); data/zephyr-3.1.2/server/server.c:890:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NS_MAXDNAME]; data/zephyr-3.1.2/server/subscr.c:226: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(subs_file, O_RDONLY, 0666); data/zephyr-3.1.2/server/subscr.c:564: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 *list[NUM_FIELDS]; data/zephyr-3.1.2/server/subscr.c:600:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/zephyr-3.1.2/server/subscr.c:604:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/zephyr-3.1.2/server/subscr.c:608: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 buf2[512]; data/zephyr-3.1.2/server/subscr.c:609: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 *list[7 * NUM_FIELDS]; data/zephyr-3.1.2/server/subscr.c:613: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(buf2, "%d",ntohs(client->addr.sin_port)); data/zephyr-3.1.2/server/subscr.c:637:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&bufp[8], Z_keydata(client->session_keyblock), Z_keylen(client->session_keyblock)); data/zephyr-3.1.2/server/subscr.c:794: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 addr[16]; /* xxx.xxx.xxx.xxx max */ data/zephyr-3.1.2/server/subscr.c:795: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 port[16]; data/zephyr-3.1.2/server/subscr.c:996: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[512]; data/zephyr-3.1.2/server/subscr.c:997: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 *list[7 * NUM_FIELDS]; data/zephyr-3.1.2/server/subscr.c:1021: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 *text[2 + NUM_FIELDS]; data/zephyr-3.1.2/server/subscr.c:1028: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 port[16]; data/zephyr-3.1.2/server/subscr.c:1245: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 rlm_recipient[REALM_SZ + 1]; data/zephyr-3.1.2/server/test_server.c:228:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(filename); data/zephyr-3.1.2/server/uloc.c:364: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 *lyst[NUM_FIELDS]; data/zephyr-3.1.2/server/version.c:36: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 vers_buf[256]; data/zephyr-3.1.2/server/zserver.h:211: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 addr_str[16]; /* text version of address */ data/zephyr-3.1.2/zhm/queue.c:79:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(entry->packet, packet, Z_MAXPKTLEN); data/zephyr-3.1.2/zhm/zhm.c:37: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 prim_serv[NS_MAXDNAME], cur_serv[NS_MAXDNAME]; data/zephyr-3.1.2/zhm/zhm.c:42:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[NS_MAXDNAME], loopback[4]; data/zephyr-3.1.2/zhm/zhm.c:43: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 PidFile[128]; data/zephyr-3.1.2/zhm/zhm.c:315:3: [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(zcluster, "zephyr"); data/zephyr-3.1.2/zhm/zhm.c:419: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). fp = fopen(PidFile, "w"); data/zephyr-3.1.2/zhm/zhm.c:443:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&serv_sin.sin_addr, hp->h_addr, 4); data/zephyr-3.1.2/zhm/zhm.c:488:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((i = open("/dev/tty", O_RDWR, 0666)) < 0) data/zephyr-3.1.2/zhm/zhm.c:507: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 version[BUFSIZ]; data/zephyr-3.1.2/zhm/zhm.c:529:6: [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 *list[20]; data/zephyr-3.1.2/zhm/zhm.c:546: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(list[1], "%d", queue_len()); data/zephyr-3.1.2/zhm/zhm.c:549: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(list[2], "%d", nclt); data/zephyr-3.1.2/zhm/zhm.c:552: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(list[3], "%d", nserv); data/zephyr-3.1.2/zhm/zhm.c:555: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(list[4], "%d", nservchang); data/zephyr-3.1.2/zhm/zhm.c:563:4: [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(list[6], "yes"); data/zephyr-3.1.2/zhm/zhm.c:565:4: [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(list[6], "no"); data/zephyr-3.1.2/zhm/zhm.c:568: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(list[7], "%ld", time((time_t *)0) - starttime); data/zephyr-3.1.2/zhm/zhm.c:577: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(list[8], "%ld", size); data/zephyr-3.1.2/zhm/zhm_server.c:166:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&serv_sin.sin_addr, hp->h_addr, 4); data/zephyr-3.1.2/zhm/zhm_server.c:206: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 suggested_server[NS_MAXDNAME]; data/zephyr-3.1.2/zwgc/X_driver.c:252: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 dbasename[128]; data/zephyr-3.1.2/zwgc/X_gram.c:146:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (temp && atoi(temp)>=0) data/zephyr-3.1.2/zwgc/X_gram.c:147:14: [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). ttl = atoi(temp); data/zephyr-3.1.2/zwgc/X_gram.c:152:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (temp && atoi(temp)>=0) data/zephyr-3.1.2/zwgc/X_gram.c:153:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ttl = atoi(temp); data/zephyr-3.1.2/zwgc/X_gram.c:167:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (temp && atoi(temp)>=0) data/zephyr-3.1.2/zwgc/X_gram.c:168:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). border_width = atoi(temp); data/zephyr-3.1.2/zwgc/X_gram.c:172:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (temp && atoi(temp)>=0) data/zephyr-3.1.2/zwgc/X_gram.c:173:31: [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). internal_border_width = atoi(temp); data/zephyr-3.1.2/zwgc/X_gram.c:177:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (temp && atoi(temp)) data/zephyr-3.1.2/zwgc/X_gram.c:178:21: [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). cursor_code = atoi(temp); data/zephyr-3.1.2/zwgc/browser.c:40: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(sun.sun_path,"/tmp/.zwgc.%d",getuid()); data/zephyr-3.1.2/zwgc/character_class.h:24: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. typedef char character_class[NUMBER_OF_CHARACTERS]; data/zephyr-3.1.2/zwgc/file.c:75: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). result = fopen(override_filename, "r"); data/zephyr-3.1.2/zwgc/file.c:76: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 (!(result = fopen(override_filename, "r"))) { data/zephyr-3.1.2/zwgc/file.c:90: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). result = fopen(filename, "r"); data/zephyr-3.1.2/zwgc/file.c:109: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 (!(result = fopen(fallback_filename, "r"))) { data/zephyr-3.1.2/zwgc/formatter.c:252:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(temp+2,str,len); data/zephyr-3.1.2/zwgc/formatter.c:262:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(temp+2,str,len); data/zephyr-3.1.2/zwgc/formatter.c:272:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(temp+2,str,len); data/zephyr-3.1.2/zwgc/formatter.c:282:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(temp+2,str,len); data/zephyr-3.1.2/zwgc/lexer.c:278: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 buffer[500]; data/zephyr-3.1.2/zwgc/lexer.c:354: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 buffer[200]; /* This must be large enough to hold "endshow" */ data/zephyr-3.1.2/zwgc/lexer.c:496: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[MAX_IDENTIFIER_LENGTH+1]; data/zephyr-3.1.2/zwgc/main.c:128: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 msgbuf[BUFSIZ]; data/zephyr-3.1.2/zwgc/main.c:168: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 defdesc[128]; data/zephyr-3.1.2/zwgc/main.c:400: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 node[NS_MAXDNAME]; data/zephyr-3.1.2/zwgc/mux.c:227:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int tty = open("/dev/tty", O_RDONLY|O_NDELAY); data/zephyr-3.1.2/zwgc/new_memory.c:176: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 buffer[20]; data/zephyr-3.1.2/zwgc/new_memory.c:188: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(buffer, "%d", line_number); data/zephyr-3.1.2/zwgc/new_string.c:66:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(result, data, length); data/zephyr-3.1.2/zwgc/new_string.c:90:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(result, s, length); data/zephyr-3.1.2/zwgc/new_string.c:115:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(result, a, a_length); data/zephyr-3.1.2/zwgc/new_string.c:116:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(result+a_length, b, b_size); data/zephyr-3.1.2/zwgc/new_string.c:146:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(a+a_length, b, b_size); data/zephyr-3.1.2/zwgc/plus.c:85: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[128]; data/zephyr-3.1.2/zwgc/plus.c:99: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, "time-bogus"); data/zephyr-3.1.2/zwgc/plus.c:252:17: [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). howlong = atoi(val); data/zephyr-3.1.2/zwgc/plus.c:455:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/zephyr-3.1.2/zwgc/port.c:336: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 buffer[10000]; /* <<<>>> */ data/zephyr-3.1.2/zwgc/port.c:492: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). out = fopen(filename, "a"); data/zephyr-3.1.2/zwgc/port.c:509: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). in = fopen(filename, "r"); data/zephyr-3.1.2/zwgc/port.c:528: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). out = fopen(filename, "w"); data/zephyr-3.1.2/zwgc/regexp.c:29: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 errbuf[512]; data/zephyr-3.1.2/zwgc/subscriptions.c:235: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 ourhost[NS_MAXDNAME], ourhostcanon[NS_MAXDNAME]; data/zephyr-3.1.2/zwgc/subscriptions.c:278: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 line[BUFSIZ]; data/zephyr-3.1.2/zwgc/subscriptions.c:279: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 class_buffer[BUFSIZ], instance[BUFSIZ], recipient[BUFSIZ]; data/zephyr-3.1.2/zwgc/tty_filter.c:73: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 code_buf[10240], *code_buf_pos = code_buf, *code; data/zephyr-3.1.2/zwgc/tty_filter.c:111:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char st_buf[128]; data/zephyr-3.1.2/zwgc/tty_filter.c:112: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 tc_buf[1024], *p = st_buf, *tmp, *term; data/zephyr-3.1.2/zwgc/variables.c:128:19: [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). field_to_get = atoi(name); data/zephyr-3.1.2/zwgc/variables.c:176: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 buffer[20]; data/zephyr-3.1.2/zwgc/variables.c:178: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(buffer, "%d", number); data/zephyr-3.1.2/zwgc/xrevstack.c:122:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/zephyr-3.1.2/zwgc/xshow.c:152: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 *bgstr, *geometry, xpos[10], ypos[10], xfrom, yfrom; data/zephyr-3.1.2/zwgc/xshow.c:174:40: [2] (buffer) wchar_t: 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. (wchar_t *)blocks[block].wstr, data/zephyr-3.1.2/zwgc/xshow.c:328:19: [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). gram_xpos = atoi(xpos); data/zephyr-3.1.2/zwgc/xshow.c:336:19: [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). gram_ypos = atoi(ypos); data/zephyr-3.1.2/zwgc/xshow.c:649: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 class_nm[NAMESIZE], instance_nm[NAMESIZE], recip_nm[NAMESIZE]; data/zephyr-3.1.2/zwgc/zephyr.c:67:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[40]; data/zephyr-3.1.2/zwgc/zephyr.c:74:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "/tmp/wg.%d", getuid()); data/zephyr-3.1.2/zwgc/zephyr.c:89: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). port_file = fopen(name, "w"); data/zephyr-3.1.2/zwgc/zephyr.c:167: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). port_file = fopen(temp, "r"); data/zephyr-3.1.2/clients/zaway/zaway.c:206: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). notice.z_message_len = strlen(notice.z_message)+1; data/zephyr-3.1.2/clients/zaway/zaway.c:238: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). bfr[strlen(bfr)-1] = '\0'; data/zephyr-3.1.2/clients/zaway/zaway.c:251: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). ptr = malloc((unsigned)(strlen(bfr)+1)); data/zephyr-3.1.2/clients/zaway/zaway.c:255: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). ptr = realloc(ptr,(unsigned)(strlen(bfr)+strlen(ptr)+1)); data/zephyr-3.1.2/clients/zaway/zaway.c:255: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). ptr = realloc(ptr,(unsigned)(strlen(bfr)+strlen(ptr)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:157:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ourhostcanon,ourhost,sizeof(ourhostcanon)-1); data/zephyr-3.1.2/clients/zctl/zctl.c:159:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ourhostcanon,hent->h_name,sizeof(ourhostcanon)-1); data/zephyr-3.1.2/clients/zctl/zctl.c:180: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). (void) sprintf(ssline+strlen(ssline),"%s ",argv[i]); data/zephyr-3.1.2/clients/zctl/zctl.c:181: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). ssline[strlen(ssline)-1] = '\0'; data/zephyr-3.1.2/clients/zctl/zctl.c:420:11: [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. (void) strcat(varcat," "); data/zephyr-3.1.2/clients/zctl/zctl.c:684: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). subline[strlen(subline)-1] = '\0'; /* nuke newline */ data/zephyr-3.1.2/clients/zctl/zctl.c:775: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). subline[strlen(subline)-1] = '\0'; /* nuke newline */ data/zephyr-3.1.2/clients/zctl/zctl.c:810: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). (char *)malloc((unsigned)(strlen(subline))); data/zephyr-3.1.2/clients/zctl/zctl.c:815: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). (char *)malloc((unsigned)(strlen(comma+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:819: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). (char *)malloc((unsigned)(strlen(comma2+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:829: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). (char *)malloc((unsigned)(strlen(subline)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:833: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). (char *)malloc((unsigned)(strlen(comma+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:837: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). (char *)malloc((unsigned)(strlen(comma2+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:845: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). (char *)malloc((unsigned)(strlen(subline)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:849: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). (char *)malloc((unsigned)(strlen(comma+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:853: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). (char *)malloc((unsigned)(strlen(comma2+1)+1)); data/zephyr-3.1.2/clients/zctl/zctl.c:1169: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). msg = (char *) malloc(strlen(class) + strlen(inst) + strlen(recip) + 4); data/zephyr-3.1.2/clients/zctl/zctl.c:1169: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). msg = (char *) malloc(strlen(class) + strlen(inst) + strlen(recip) + 4); data/zephyr-3.1.2/clients/zctl/zctl.c:1169: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). msg = (char *) malloc(strlen(class) + strlen(inst) + strlen(recip) + 4); data/zephyr-3.1.2/clients/zctl/zctl.c:1189: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). notice.z_message_len = strlen(class)+strlen(inst)+strlen(recip)+3; data/zephyr-3.1.2/clients/zctl/zctl.c:1189:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). notice.z_message_len = strlen(class)+strlen(inst)+strlen(recip)+3; data/zephyr-3.1.2/clients/zctl/zctl.c:1189:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). notice.z_message_len = strlen(class)+strlen(inst)+strlen(recip)+3; data/zephyr-3.1.2/clients/zctl/zctl.c:1261:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(msg,notice.z_message, notice.z_message_len); data/zephyr-3.1.2/clients/zctl/zctl.c:1356: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). col += strlen(commands[i].names[0]); data/zephyr-3.1.2/clients/zctl/zctl.c:1359: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). col += 2 + strlen(commands[i].names[j]); data/zephyr-3.1.2/clients/zleave/zleave.c:124:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buff[read(0, buff, sizeof buff)] = 0; data/zephyr-3.1.2/clients/zleave/zleave.c:325:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). real_message = (char *) malloc(strlen(msg) + data/zephyr-3.1.2/clients/zleave/zleave.c:326: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(reminder_message) + 3); data/zephyr-3.1.2/clients/zleave/zleave.c:345:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). notice.z_message_len = strlen(msg)+strlen(reminder_message)+3; data/zephyr-3.1.2/clients/zleave/zleave.c:345: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). notice.z_message_len = strlen(msg)+strlen(reminder_message)+3; data/zephyr-3.1.2/clients/zleave/zleave.c:420:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(ufd, &ubuf, sizeof(ubuf)); data/zephyr-3.1.2/clients/zlocate/zlocate.c:124: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). rlen = strlen(ZGetRealm()); data/zephyr-3.1.2/clients/zlocate/zlocate.c:130:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(user,argv[loc],sizeof(user) - rlen - 2); data/zephyr-3.1.2/clients/zlocate/zlocate.c:133:13: [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. (void) strcat(user,"@"); data/zephyr-3.1.2/clients/znol/znol.c:144:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp = cleanname + strlen(cleanname) - 1; data/zephyr-3.1.2/clients/znol/znol.c:156: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). cp = name + strlen(name); data/zephyr-3.1.2/clients/znol/znol.c:165: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). malloc((unsigned)(strlen(name) + strlen(realm) + 2))) data/zephyr-3.1.2/clients/znol/znol.c:165: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). malloc((unsigned)(strlen(name) + strlen(realm) + 2))) data/zephyr-3.1.2/clients/znol/znol.c:175: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). malloc((unsigned)(strlen(realm)+2))) == NULL) { data/zephyr-3.1.2/clients/znol/znol.c:182: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). malloc((unsigned)(strlen(name)+1))) == NULL) data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:113: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(msgbuff) + (ptr - message)) > Z_MAXPKTLEN){ data/zephyr-3.1.2/clients/zshutdown_notify/zshutdown_notify.c:117: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). ptr += strlen(ptr); data/zephyr-3.1.2/clients/zstat/zstat.c:172: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). mp += strlen(mp)+1; data/zephyr-3.1.2/clients/zstat/zstat.c:282: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). mp += strlen(mp)+1; data/zephyr-3.1.2/clients/zwrite/zwrite.c:99: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(argv[arg]) > 2) data/zephyr-3.1.2/clients/zwrite/zwrite.c:268: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). message = malloc((unsigned)(strlen(signature)+2)); data/zephyr-3.1.2/clients/zwrite/zwrite.c:270: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). msgsize = strlen(message); data/zephyr-3.1.2/clients/zwrite/zwrite.c:280: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). size += (strlen(recips[arg]) + 2); data/zephyr-3.1.2/clients/zwrite/zwrite.c:287: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). msgsize += strlen(recips[arg]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:300: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 += (strlen(argv[arg]) + 1); data/zephyr-3.1.2/clients/zwrite/zwrite.c:305: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). msgsize += strlen(argv[arg]); data/zephyr-3.1.2/clients/zwrite/zwrite.c:322:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(bfr); data/zephyr-3.1.2/clients/zwrite/zwrite.c:332:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nchars = read(fileno(stdin), bfr, sizeof bfr))) { data/zephyr-3.1.2/clients/zwrite/zwrite.c:499:10: [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. (void) strcat(fsinst, ":"); data/zephyr-3.1.2/lib/ZAsyncLocate.c:46: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). if ((zald->user = (char *) malloc(strlen(user)+1)) == NULL) { data/zephyr-3.1.2/lib/ZAsyncLocate.c:49:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((zald->version = (char *) malloc(strlen(notice.z_version)+1)) == NULL) { data/zephyr-3.1.2/lib/ZAsyncLocate.c:114:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (ptr) + 1; data/zephyr-3.1.2/lib/ZAsyncLocate.c:121:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (ptr) + 1; data/zephyr-3.1.2/lib/ZAsyncLocate.c:128:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (ptr) + 1; data/zephyr-3.1.2/lib/ZAsyncLocate.c:140: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 ((*user = (char *) malloc(strlen(zald->user)+1)) == NULL) data/zephyr-3.1.2/lib/ZAsyncLocate.c:144: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 ((*user = (char *) malloc(strlen(notice->z_class_inst)+1)) == NULL) data/zephyr-3.1.2/lib/ZCkAuth.c:58: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(notice->z_default_format) + 1 data/zephyr-3.1.2/lib/ZCkZAut.c:76: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). cksum0_len = x + strlen(x) + 1 - cksum0_base; data/zephyr-3.1.2/lib/ZCkZAut.c:92: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). x = cksum1_base + strlen(cksum1_base) + 1; /* multinotice */ data/zephyr-3.1.2/lib/ZCkZAut.c:94: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). x = x + strlen(x) + 1; /* multiuid */ data/zephyr-3.1.2/lib/ZCkZAut.c:96: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). x = x + strlen(x) + 1; /* sender */ data/zephyr-3.1.2/lib/ZCkZAut.c:98:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cksum1_len = x + strlen(x) + 1 - cksum1_base; /* charset / extra field */ data/zephyr-3.1.2/lib/ZCkZAut.c:139: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). asn1_len = strlen(notice->z_ascii_checksum) + 1; data/zephyr-3.1.2/lib/ZExpnRlm.c:24:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(expand, list_realms[0], sizeof(expand)); data/zephyr-3.1.2/lib/ZExpnRlm.c:79: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). if (!strncmp(krb_realm, expand, strlen(expand))) { data/zephyr-3.1.2/lib/ZExpnRlm.c:94: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(krb_realm, expand, strlen(expand))) { data/zephyr-3.1.2/lib/ZFmtList.c:40: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). size += strlen(list[i])+1; data/zephyr-3.1.2/lib/ZFmtList.c:53: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). i = strlen(*list)+1; data/zephyr-3.1.2/lib/ZFmtRawLst.c:37: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). size += strlen(list[i])+1; data/zephyr-3.1.2/lib/ZFmtRawLst.c:49: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). i = strlen(*list)+1; data/zephyr-3.1.2/lib/ZFmtSmRLst.c:36: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). size += strlen(list[i])+1; data/zephyr-3.1.2/lib/ZFmtSmRLst.c:46: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). i = strlen(*list)+1; data/zephyr-3.1.2/lib/ZGetSender.c:73: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). sender = malloc(strlen(pw->pw_name) + strlen(__Zephyr_realm) + 2); data/zephyr-3.1.2/lib/ZGetSender.c:73:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sender = malloc(strlen(pw->pw_name) + strlen(__Zephyr_realm) + 2); data/zephyr-3.1.2/lib/ZInit.c:387: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). qname = malloc(strlen(p) + strlen("_kerberos..") + 1); data/zephyr-3.1.2/lib/ZInit.c:387: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). qname = malloc(strlen(p) + strlen("_kerberos..") + 1); data/zephyr-3.1.2/lib/ZLocations.c:40:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(host, hent->h_name, sizeof(host)); data/zephyr-3.1.2/lib/ZLocations.c:145: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). bptr[1][strlen(bptr[1])-1] = '\0'; data/zephyr-3.1.2/lib/ZMkAuth.c:293: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). strlen(realm), data/zephyr-3.1.2/lib/ZRetSubs.c:41: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). notice.z_message_len = strlen(asciiport)+1; data/zephyr-3.1.2/lib/ZRetSubs.c:147:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). malloc(strlen(ptr) + 1); data/zephyr-3.1.2/lib/ZRetSubs.c:153: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/ZRetSubs.c:155: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). malloc(strlen(ptr) + 1); data/zephyr-3.1.2/lib/ZRetSubs.c:161: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/ZRetSubs.c:164: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). malloc(strlen(ptr2) + 2); data/zephyr-3.1.2/lib/ZRetSubs.c:175: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/ZSubs.c:160:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((j = strlen(list[i*3]) data/zephyr-3.1.2/lib/ZSubs.c:161: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(list[i*3+1]) data/zephyr-3.1.2/lib/ZSubs.c:162: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(list[i*3+2]) + 3) <= size) { data/zephyr-3.1.2/lib/ZSubs.c:236: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). notice.z_message_len = strlen(recip) + 1; data/zephyr-3.1.2/lib/ZVariables.c:65: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). if (varbfr[strlen(varbfr)-1] < ' ') data/zephyr-3.1.2/lib/ZVariables.c:66: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). varbfr[strlen(varbfr)-1] = '\0'; data/zephyr-3.1.2/lib/ZVariables.c:103: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). if (varbfr[strlen(varbfr)-1] < ' ') data/zephyr-3.1.2/lib/ZVariables.c:104: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). varbfr[strlen(varbfr)-1] = '\0'; data/zephyr-3.1.2/lib/ZVariables.c:136: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. (void) strcat(bfr, "/"); data/zephyr-3.1.2/lib/ZVariables.c:154:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (varbfr[strlen(varbfr)-1] < ' ') data/zephyr-3.1.2/lib/ZVariables.c:155: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). varbfr[strlen(varbfr)-1] = '\0'; data/zephyr-3.1.2/lib/ZVariables.c:183: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 (strncasecmp(bfr, var, max(strlen(var), namelen))) data/zephyr-3.1.2/lib/Zinternal.c:880: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:884: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:889: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:893: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:897: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:901: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:918: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(notice->z_recipient) + strlen(__Zephyr_realm) + 2 > data/zephyr-3.1.2/lib/Zinternal.c:918: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 (strlen(notice->z_recipient) + strlen(__Zephyr_realm) + 2 > data/zephyr-3.1.2/lib/Zinternal.c:942: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:953: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). ptr += strlen(ptr)+1; data/zephyr-3.1.2/lib/Zinternal.c:971: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). ptr += strlen(ptr) + 1; data/zephyr-3.1.2/lib/Zinternal.c:977: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). ptr += strlen(ptr) + 1; data/zephyr-3.1.2/lib/Zinternal.c:1016:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = field ? strlen (field) + 1 : 1; data/zephyr-3.1.2/lib/Zinternal.c:1352: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). int zcode_len = strlen(cstart) + 1; data/zephyr-3.1.2/lib/charset.c:98: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). outset_t = malloc(strlen(outset) + 11); data/zephyr-3.1.2/server/access.c:202: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). else if ((len = strlen(class_name)) != 0) data/zephyr-3.1.2/server/acl_files.c:108: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(princ); data/zephyr-3.1.2/server/bdump.c:323: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). strlen(ZGetRealm()), data/zephyr-3.1.2/server/bdump.c:412:9: [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. (void) strcpy(instance, "*"); /* let Kerberos fill it in */ data/zephyr-3.1.2/server/bdump.c:610: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). strlen(ZGetRealm()), data/zephyr-3.1.2/server/bdump.c:1063: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). strlen(ZGetRealm()), data/zephyr-3.1.2/server/bdump.c:1295: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). cp = notice.z_message + strlen(notice.z_message) + 1; data/zephyr-3.1.2/server/bdump.c:1309: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). retval = ZReadAscii(cp, strlen(cp), cblock, sizeof(cblock)); data/zephyr-3.1.2/server/bdump.c:1351: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). cp = notice.z_message + strlen(notice.z_message) + 1; data/zephyr-3.1.2/server/bdump.c:1352: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). retval = ZReadAscii(cp, strlen(cp), cblock, sizeof(C_Block)); data/zephyr-3.1.2/server/bdump.c:1594: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). cp += (strlen(cp) + 1); /* past the null */ data/zephyr-3.1.2/server/dispatch.c:369:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(recipbuf, notice->z_recipient, sizeof(recipbuf)); data/zephyr-3.1.2/server/dispatch.c:376:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(recipp + 1, realm_expand_realm(recipp + 1), data/zephyr-3.1.2/server/dispatch.c:808: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). acknotice.z_message_len = strlen(acknotice.z_message) + 1; data/zephyr-3.1.2/server/dispatch.c:1204:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). shutnotice.z_message_len = (server) ? strlen(server->addr_str) + 1 : 0; data/zephyr-3.1.2/server/dispatch.c:1235: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). recipient = (char *) malloc(strlen(realm) + 4); data/zephyr-3.1.2/server/kstuff.c:57:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &p[i], 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:72:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &ticket.dat[i], 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:81:12: [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. (void) strcpy(instance,"*"); /* let Kerberos fill it in */ data/zephyr-3.1.2/server/kstuff.c:116: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). size_to_write = strlen (p); data/zephyr-3.1.2/server/kstuff.c:137:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &p[i], 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:176:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, dst++, 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:197:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &p[i], 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:219:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, dst++, 1) != 1) { data/zephyr-3.1.2/server/kstuff.c:234: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). size_to_write = strlen (p); data/zephyr-3.1.2/server/kstuff.c:293:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(notice->z_ascii_authent)+1; data/zephyr-3.1.2/server/kstuff.c:354: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). result = krb5_build_principal(Z_krb5_ctx, &server, strlen(__Zephyr_realm), data/zephyr-3.1.2/server/kstuff.c:489: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). cksum0_len = x + strlen(x) + 1 - cksum0_base; data/zephyr-3.1.2/server/kstuff.c:505: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). x = cksum1_base + strlen(cksum1_base) + 1; /* multinotice */ data/zephyr-3.1.2/server/kstuff.c:507: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). x = x + strlen(x) + 1; /* multiuid */ data/zephyr-3.1.2/server/kstuff.c:509: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). x = x + strlen(x) + 1; /* sender */ data/zephyr-3.1.2/server/kstuff.c:511:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cksum1_len = x + strlen(x) + 1 - cksum1_base; /* charset / extra field */ data/zephyr-3.1.2/server/kstuff.c:567: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). asn1_len = strlen(notice->z_ascii_checksum) + 1; data/zephyr-3.1.2/server/kstuff.c:642: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). strlen(notice->z_ascii_authent)+1, data/zephyr-3.1.2/server/kstuff.c:683: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). cstart = notice->z_default_format + strlen(notice->z_default_format) + 1; data/zephyr-3.1.2/server/kstuff.c:684: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). cend = cstart + strlen(cstart) + 1; data/zephyr-3.1.2/server/kstuff.c:698: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). cstart = notice->z_default_format + strlen(notice->z_default_format) + 1; data/zephyr-3.1.2/server/main.c:139:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(my_realm, optarg, REALM_SZ); data/zephyr-3.1.2/server/main.c:351: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). char *env=(char *)malloc(strlen(tkt5_file)+12); data/zephyr-3.1.2/server/main.c:418:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(myname, hostname, NS_MAXDNAME); data/zephyr-3.1.2/server/main.c:421:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(myname, hp->h_name, NS_MAXDNAME); data/zephyr-3.1.2/server/realm.c:297: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). if (!strncasecmp(ZGetRealm(), realmname, strlen(realmname))) data/zephyr-3.1.2/server/realm.c:302: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). if (!strncasecmp(otherrealms[a]->name, realmname, strlen(realmname))) data/zephyr-3.1.2/server/realm.c:510: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). if (!strncasecmp(otherrealms[a]->name, name, strlen(name))) data/zephyr-3.1.2/server/realm.c:576: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). acknotice.z_message_len = strlen(acknotice.z_message) + 1; data/zephyr-3.1.2/server/realm.c:858:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snotice.z_message_len = (server) ? strlen(server->addr_str) + 1 : 0; data/zephyr-3.1.2/server/realm.c:1509: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). strlen(realm), data/zephyr-3.1.2/server/realm.c:1561: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(realm->name), realm->name, data/zephyr-3.1.2/server/realm.c:1633:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(realm->name), realm->name, data/zephyr-3.1.2/server/server.c:621: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). cp += strlen(cp) + 1; data/zephyr-3.1.2/server/subscr.c:243:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retval = read(fd, def_sub_area, (size_t) statbuf.st_size); data/zephyr-3.1.2/server/subscr.c:700: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). #define ADVANCE(xx) { cp += (strlen(cp) + 1); \ data/zephyr-3.1.2/server/subscr.c:728: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). cp += (strlen(cp) + 1); data/zephyr-3.1.2/server/subscr.c:774: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). #define I_ADVANCE(xx) { cp += (strlen(cp) + 1); \ data/zephyr-3.1.2/server/subscr.c:1262: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 ((status = ZReadAscii(cp, strlen(cp), (unsigned char *)&snotice.z_port, data/zephyr-3.1.2/server/uloc.c:507: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). cp += (strlen(cp) + 1); data/zephyr-3.1.2/server/uloc.c:511: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). cp += (strlen(cp) + 1); data/zephyr-3.1.2/server/utf8proc.c:118: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). const uint8_t *str, ssize_t strlen, int32_t *dst data/zephyr-3.1.2/server/utf8proc.c:124:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen) return 0; data/zephyr-3.1.2/server/utf8proc.c:127: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 >= 0 && length > strlen) return UTF8PROC_ERROR_INVALIDUTF8; data/zephyr-3.1.2/server/utf8proc.c:127: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). if (strlen >= 0 && length > strlen) return UTF8PROC_ERROR_INVALIDUTF8; data/zephyr-3.1.2/server/utf8proc.c:353: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). const uint8_t *str, ssize_t strlen, data/zephyr-3.1.2/server/utf8proc.c:377: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). if (rpos >= strlen) break; data/zephyr-3.1.2/server/utf8proc.c:530: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). const uint8_t *str, ssize_t strlen, uint8_t **dstptr, int options data/zephyr-3.1.2/server/utf8proc.c:535: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). result = utf8proc_decompose(str, strlen, NULL, 0, options); data/zephyr-3.1.2/server/utf8proc.c:539: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). result = utf8proc_decompose(str, strlen, buffer, result, options); data/zephyr-3.1.2/server/utf8proc.h:232:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ssize_t utf8proc_iterate(const uint8_t *str, ssize_t strlen, int32_t *dst); data/zephyr-3.1.2/server/utf8proc.h:297: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). const uint8_t *str, ssize_t strlen, data/zephyr-3.1.2/server/utf8proc.h:338: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). const uint8_t *str, ssize_t strlen, uint8_t **dstptr, int options data/zephyr-3.1.2/server/version.c:42:14: [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. (void) strcat(vers_buf, "/"); data/zephyr-3.1.2/server/version.c:46:14: [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. (void) strcat(vers_buf, "-"); data/zephyr-3.1.2/zhm/queue.c:199: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). for (ml = strlen(mp) + 1; ml <= entry->notice.z_message_len; ml++) { data/zephyr-3.1.2/zhm/queue.c:201: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). mp += strlen(mp)+1; data/zephyr-3.1.2/zhm/queue.c:202: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). ml += strlen(mp); data/zephyr-3.1.2/zhm/zhm.c:131:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prim_serv, hp->h_name, sizeof(prim_serv)); data/zephyr-3.1.2/zhm/zhm.c:287:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prim_serv, c+1, sizeof(prim_serv)); data/zephyr-3.1.2/zhm/zhm.c:298:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((zcluster = malloc((unsigned)(strlen(c+1)+1))) data/zephyr-3.1.2/zhm/zhm.c:314:40: [1] (buffer) strlen: Does not handle 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 ((zcluster = malloc((unsigned)(strlen("zephyr")+1))) != NULL) data/zephyr-3.1.2/zhm/zhm.c:356:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prim_serv, serv_list[random() % numserv], sizeof(prim_serv)); data/zephyr-3.1.2/zhm/zhm.c:386:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prim_serv, *serv_list, sizeof(prim_serv)); data/zephyr-3.1.2/zhm/zhm.c:441:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cur_serv, prim_serv, sizeof(cur_serv)); data/zephyr-3.1.2/zhm/zhm.c:580:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(list[9], MACHINE_TYPE, 32); data/zephyr-3.1.2/zhm/zhm_server.c:114:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(cur_serv, sugg_serv, NS_MAXDNAME); data/zephyr-3.1.2/zhm/zhm_server.c:127:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(cur_serv, prim_serv, NS_MAXDNAME); data/zephyr-3.1.2/zhm/zhm_server.c:138:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(cur_serv, *serv_list, NS_MAXDNAME); data/zephyr-3.1.2/zhm/zhm_server.c:157:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(cur_serv, new_serv, NS_MAXDNAME); data/zephyr-3.1.2/zhm/zhm_server.c:215:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(suggested_server, hp->h_name, sizeof(suggested_server)); data/zephyr-3.1.2/zwgc/X_gram.h:32: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). int strlen; data/zephyr-3.1.2/zwgc/browser.c:38:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sun.sunpath,temp,sizeof(sun.sunpath)); data/zephyr-3.1.2/zwgc/browser.c:42:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (len=strlen(sun.sunpath)) > sizeof(sun.sunpath)? data/zephyr-3.1.2/zwgc/character_class.c:39:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(str); data/zephyr-3.1.2/zwgc/exec.c:247: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). write_on_port(name, temp, strlen(temp)); data/zephyr-3.1.2/zwgc/exec.c:250: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). write_on_port(var_get_variable("output_driver"), temp, strlen(temp)); data/zephyr-3.1.2/zwgc/formatter.c:238:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/zephyr-3.1.2/zwgc/formatter.c:249:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp=(char *) malloc((len=strlen(str))+4); data/zephyr-3.1.2/zwgc/formatter.c:259:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp=(char *) malloc((len=strlen(str))+4); data/zephyr-3.1.2/zwgc/formatter.c:269:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp=(char *) malloc((len=strlen(str))+4); data/zephyr-3.1.2/zwgc/formatter.c:279:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp=(char *) malloc((len=strlen(str))+4); data/zephyr-3.1.2/zwgc/formatter.c:350: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). templen += strlen(temp3); data/zephyr-3.1.2/zwgc/formatter.c:475: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). (void) memmove(text+1,text+2,strlen(text+1)); data/zephyr-3.1.2/zwgc/lexer.c:80:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(input_file); data/zephyr-3.1.2/zwgc/lexer.c:373:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((ptr==buffer+strlen("endshow")) && test_for_endshow) data/zephyr-3.1.2/zwgc/lexer.c:374: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(buffer, "endshow", strlen("endshow")) data/zephyr-3.1.2/zwgc/main.c:150:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). notice->z_message_len = strlen(notice->z_message)+1; data/zephyr-3.1.2/zwgc/main.c:365:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int key_len = strlen(punt_ent->key); data/zephyr-3.1.2/zwgc/main.c:383: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). tmp = punt_reply.z_message + strlen(punt_reply.z_message); data/zephyr-3.1.2/zwgc/main.c:385:5: [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 (punt_reply.z_message, "\n"); data/zephyr-3.1.2/zwgc/main.c:425: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(node, "?"); data/zephyr-3.1.2/zwgc/new_string.h:27: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 string_Length(s) strlen(s) data/zephyr-3.1.2/zwgc/plus.c:96: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(event->event_name)<123) data/zephyr-3.1.2/zwgc/plus.c:131:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = (char *)malloc(strlen(name) + 1); data/zephyr-3.1.2/zwgc/plus.c:233: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). pt->hname=(char *)malloc(strlen(hname)+1); data/zephyr-3.1.2/zwgc/plus.c:490:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, " "); data/zephyr-3.1.2/zwgc/plus.c:491:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, pt->opcode, sizeof(buf)-strlen(buf)); data/zephyr-3.1.2/zwgc/plus.c:491: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). strncat(buf, pt->opcode, sizeof(buf)-strlen(buf)); data/zephyr-3.1.2/zwgc/port.c:491:14: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oumask = umask(077); /* allow read/write for us only */ data/zephyr-3.1.2/zwgc/port.c:493:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(oumask); data/zephyr-3.1.2/zwgc/port.c:527:14: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oumask = umask(077); /* allow read/write for us only */ data/zephyr-3.1.2/zwgc/port.c:529:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void) umask(oumask); data/zephyr-3.1.2/zwgc/subscriptions.c:248:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ourhostcanon, ourhost, sizeof(ourhostcanon)-1); data/zephyr-3.1.2/zwgc/subscriptions.c:251:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ourhostcanon, hent->h_name, sizeof(ourhostcanon)-1); data/zephyr-3.1.2/zwgc/text_operations.c:83: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). char *p = text + strlen(text); data/zephyr-3.1.2/zwgc/text_operations.c:101: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). char *p = text + strlen(text); data/zephyr-3.1.2/zwgc/text_operations.c:119: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). char *p = text + strlen(text); data/zephyr-3.1.2/zwgc/variables.c:125: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(name)>12) data/zephyr-3.1.2/zwgc/xcut.c:78:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = gram->blocks[i].strlen; data/zephyr-3.1.2/zwgc/xcut.c:334: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). XStoreBytes(dpy, selected_text, strlen(selected_text)+1); data/zephyr-3.1.2/zwgc/xcut.c:353: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). XStoreBytes(dpy, selected_text, strlen(selected_text)+1); data/zephyr-3.1.2/zwgc/xmark.c:399:37: [1] (buffer) strlen: Does not handle 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 = markgram->blocks[i].strlen; data/zephyr-3.1.2/zwgc/xrevstack.c:130:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf,gram->text,63); data/zephyr-3.1.2/zwgc/xshow.c:304:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gram->text + strindex, auxblocks[block].str, data/zephyr-3.1.2/zwgc/xshow.c:306: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). strindex += blocks[block].strlen; data/zephyr-3.1.2/zwgc/xshow.c:388: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(str); ANALYSIS SUMMARY: Hits = 837 Lines analyzed = 53357 in approximately 2.07 seconds (25812 lines/second) Physical Source Lines of Code (SLOC) = 41375 Hits@level = [0] 683 [1] 256 [2] 361 [3] 37 [4] 183 [5] 0 Hits@level+ = [0+] 1520 [1+] 837 [2+] 581 [3+] 220 [4+] 183 [5+] 0 Hits/KSLOC@level+ = [0+] 36.7372 [1+] 20.2296 [2+] 14.0423 [3+] 5.31722 [4+] 4.42296 [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.