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/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/expand.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/apps/usage.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/context.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/crt.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/crt.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/history.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/history.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/html.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/keydis.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/keydis.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/keys.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/libsympathy.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/log.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/log.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/project.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/prototypes.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ptty.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/raw.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/render.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ring.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/ring.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/rx.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/serial.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/slide.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/slide.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/terminal.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/tty.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/tty.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/utf8.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/utf8.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/util.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/version.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/version.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102_charset.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102_charset.h Examining data/sympathy-1.2.1+woking+cvs+git20171124/test/test.c Examining data/sympathy-1.2.1+woking+cvs+git20171124/test/xn.c FINAL RESULTS: data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:376:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (ptr, ", %d client%s", status.nclients, data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:383:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (ptr, ", %d err%s", c->tp->biterrs, data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:230:7: [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, fmt, ap); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:271:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. n = vsnprintf (buf, size, fmt, aq); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:508: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 (hostname, name.nodename); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:753: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 (buf, oargs['w']); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:868: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). strcat (search_string, ptr); data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:286:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. i = sprintf (buf, "\033]0;%s\007", t); data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.c:173: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 (c->csl, msg); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:136: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 (fle->name, fn); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:191: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 (tmpfn, name); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:251: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 (buf, lock_dirs[i]); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:253: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 (buf, leaf); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:287: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 (ptr, leaf); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:289: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 (ptr, leaf); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:291: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 (ptr, leaf); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:293: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 (ptr, leaf); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:336: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 (buf, dir); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:337: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 (buf, de->d_name); data/sympathy-1.2.1+woking+cvs+git20171124/src/log.c:306:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. n = vsnprintf (buf, size, fmt, ap); data/sympathy-1.2.1+woking+cvs+git20171124/src/ptty.c:202:7: [4] (shell) execv: 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. execv (path, argv); data/sympathy-1.2.1+woking+cvs+git20171124/src/ptty.c:204:7: [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 (path, argv); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:69:3: [4] (shell) execlp: 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. execlp ("gzip", "gzip", file, (char *) 0); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:86:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf1, "%s.%d", file, i - 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:87:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf2, "%s.%d", file, i); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:90:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf1, "%s.%d.gz", file, i - 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:91:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf2, "%s.%d.gz", file, i); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:95:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf1, "%s.%d", file, 0); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:98:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf1, "%s.%d", file, GZIP_AFTER); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:100: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 (buf1, R_OK)) data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:150: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 (sun->sun_path, path); data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:229: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 (sun->sun_path, path); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:320:10: [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. home = getenv ("HOME"); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:559:15: [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 ((c = getopt (argc, argv, "BI:NCSRP:vw:utscr:lKHd:pb:fL:Fk:n:")) != EOF) data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:279: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. char *term = getenv ("TERM"); data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c:298: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 mbuf[IPC_MAX_BUF + sizeof (IPC_Msg_status)]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c:332: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 mbuf[IPC_MAX_BUF + sizeof (IPC_Msg_term)]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c:345:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (m->term, buf, len); data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:260:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024], *ptr = buf; data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:318:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:330:10: [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. ptr += sprintf (ptr, "CTRL-B "); data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:338:10: [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. ptr += sprintf (ptr, " %db", status.baud); data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:364: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. sprintf (ptr, ", On %d.%d", status.cd_edge_sec / 60, data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:370: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. sprintf (ptr, ", Off %d.%d", status.cd_edge_sec / 60, data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:388:18: [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. ptr += sprintf (ptr, " try higher"); data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:392:18: [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. ptr += sprintf (ptr, " try %db", c->tp->guessed_baud); data/sympathy-1.2.1+woking+cvs+git20171124/apps/mainloop.c:555: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 buf[IPC_MAX_BUF]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:194: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 hostname[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:503:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (hostname, "unknown."); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:545: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 *oargs[128]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:752:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128], *ptr; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:822: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). fp = fopen (pid_file, "w"); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:860:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char kernel_cmdline[4096] = { 0 }; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:861:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char search_string[1024] = "console="; data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:870:18: [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 ("/proc/cmdline", O_RDONLY); data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:170: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[16]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:277:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:297: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[16]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:318: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. i = sprintf (buf, "\033[%d;%dm", fg, bg); data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:549: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[32]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:569: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. i = sprintf (buf, "\033[%d;%dr", 1, guess_scroll); data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:596: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. i = sprintf (buf, "\033[%d;%dH", guess_scroll, 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:614:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&a->crt.screen[CRT_ADDR_POS (&e)], data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:659: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[1024]; // = "Window is too small"; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:665: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 (msg, "Window too small (%dx%d need %dx%d)", a->size.x, data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.c:903:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ansi.h:88: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 escape_buf[ANSI_ESCAPE_BUF_LEN]; data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.c:71:36: [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). ctx->k->set_baud (ctx->k, ctx, atoi (buf + 4)); data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.c:83:36: [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). ctx->k->set_size (ctx->k, ctx, atoi (buf + 5), 0); data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.c:85:39: [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). ctx->k->set_size (ctx->k, ctx, 0, atoi (buf + 6)); data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.h:51: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 csl[128]; data/sympathy-1.2.1+woking+cvs+git20171124/src/cmd.h:52: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/sympathy-1.2.1+woking+cvs+git20171124/src/crt.c:127: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 (&c->screen[p], &c->screen[p + CRT_COLS], l); data/sympathy-1.2.1+woking+cvs+git20171124/src/crt.c:162: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 (&c->screen[p], &c->screen[p - CRT_COLS], l); data/sympathy-1.2.1+woking+cvs+git20171124/src/history.c:74:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (e->line, c, sizeof (CRT_CA) * CRT_COLS); data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:87: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[sizeof (IPC_Msg_hdr) + IPC_MAX_BUF]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:159: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 mbuf[IPC_MAX_BUF + sizeof (IPC_Msg_hdr)]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:169:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (m->term, buf, len); data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:178: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 mbuf[IPC_MAX_BUF + sizeof (IPC_Msg_hdr)]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.h:91: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 msg[0]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.h:97: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 msg[0]; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.h:131: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 status[0]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:186:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024], tmpfn[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:199:10: [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. ptr += sprintf (ptr, "LTMP.%d", getpid ()); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:202: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. i = sprintf (buf, "%10d\n", getpid ()); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:205: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). fd = open (tmpfn, O_WRONLY | O_CREAT | O_TRUNC, 0444); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:239:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:277:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024] = "LCK.."; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:317:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:318:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "LCK.%03d.%03d", major (dev), minor (dev)); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:325:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:384: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 apid[20]; data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:387: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). fd = open (path, O_RDONLY); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.h:59: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 name[FILE_LIST_MAX_LEN]; data/sympathy-1.2.1+woking+cvs+git20171124/src/log.c:149: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). l->fp = fopen (l->filename, "a+"); data/sympathy-1.2.1+woking+cvs+git20171124/src/log.c:189: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). l->fp = fopen (l->filename, "a+"); data/sympathy-1.2.1+woking+cvs+git20171124/src/log.c:256: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). l->fp = fopen (fn, "a+"); data/sympathy-1.2.1+woking+cvs+git20171124/src/ptty.c:177: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 name[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/raw.c:185: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 (t->name, "raw"); data/sympathy-1.2.1+woking+cvs+git20171124/src/raw.c:221:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/serial.c:186: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 name[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/serial.c:197: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). fd = open (path, O_RDWR | O_NOCTTY | O_NONBLOCK); data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:268:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:288:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:328:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (SLIDE_WPTR (s->write_buf), buf, len); data/sympathy-1.2.1+woking+cvs+git20171124/src/terminal.c:124: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[32]; data/sympathy-1.2.1+woking+cvs+git20171124/src/terminal.c:152: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. i = sprintf (buf, "\033[%d;%dH", t->displayed_length ? (t->displayed_length + 1) : (CRT_ROWS + 1), 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/terminal.c:303: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 (t->name, "terminal"); data/sympathy-1.2.1+woking+cvs+git20171124/src/tty.h:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; \ data/sympathy-1.2.1+woking+cvs+git20171124/src/util.c:166: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[4]; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:447: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 logbuf[4 * (VT102_MAX_COLS + 1)], *logptr = logbuf; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:735: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). m = atoi (ns); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:775: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 num[4]; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:823: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). a = atoi (na); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:930: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 num[4]; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1068:12: [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). narg = atoi (arg); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1114: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). x = atoi (ptr + 1) - 1; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1266: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 buf[10 + 2*sizeof(int)*3]; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1268:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. i = sprintf (buf, "\033[%d;%dR", v->pos.y + 1, v->pos.x + 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1288:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). v->bottom_margin.y = atoi (ptr) - 1; data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1944:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char kpoff[KEY_NUM] = { data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:2017:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. i = sprintf (buf, "\033[%d~", (key - KEY_180)); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.h:114: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 cmd_buf[VT102_CMD_LEN]; data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c:306:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (msg) + 1; data/sympathy-1.2.1+woking+cvs+git20171124/apps/clients.c:315:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (m->status, msg, IPC_MAX_BUF); data/sympathy-1.2.1+woking+cvs+git20171124/apps/expand.c:136: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 (in); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:299: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). ret = ptr = xmalloc (strlen (dir) + strlen (leaf) + 2); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:299: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). ret = ptr = xmalloc (strlen (dir) + strlen (leaf) + 2); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:421: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). int hostname_len = strlen (hostname); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:509:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (hostname, "."); data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:714:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (cs_pipe[0], &pid, sizeof (pid)) != sizeof (pid)) data/sympathy-1.2.1+woking+cvs+git20171124/apps/sympathy.c:872:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fish = read (fd, kernel_cmdline, sizeof (kernel_cmdline)); data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:94:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (m->msg, msg, IPC_MAX_BUF); data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:97: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). m->size = sizeof (IPC_Msg_hdr) + strlen (m->msg) + 1; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:184:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (buf) + 1; data/sympathy-1.2.1+woking+cvs+git20171124/src/ipc.c:188:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (m->status, buf, IPC_MAX_BUF - 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:125:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i = strlen (fn); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:252: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 (buf, "/"); data/sympathy-1.2.1+woking+cvs+git20171124/src/lockfile.c:391:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). length = read (fd, apid, sizeof (apid) - 1); data/sympathy-1.2.1+woking+cvs+git20171124/src/ptty.c:223:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (t->name, name, sizeof (t->name)); data/sympathy-1.2.1+woking+cvs+git20171124/src/raw.c:96:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). red = read (fd, buf, len); data/sympathy-1.2.1+woking+cvs+git20171124/src/raw.c:152:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (1000); data/sympathy-1.2.1+woking+cvs+git20171124/src/rotate.c:81: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). i = strlen (file) + 32; data/sympathy-1.2.1+woking+cvs+git20171124/src/serial.c:217:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (t->name, path, sizeof (t->name)); data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:145: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). n = strlen (path) + sizeof (struct sockaddr_un); data/sympathy-1.2.1+woking+cvs+git20171124/src/symsocket.c:224: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). n = strlen (path) + sizeof (struct sockaddr_un); data/sympathy-1.2.1+woking+cvs+git20171124/src/terminal.c:266:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (1000); data/sympathy-1.2.1+woking+cvs+git20171124/src/util.c:55:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). red = read (fd, buf, len); data/sympathy-1.2.1+woking+cvs+git20171124/src/vt102.c:1015: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). int l = strlen (buf); ANALYSIS SUMMARY: Hits = 149 Lines analyzed = 12887 in approximately 0.29 seconds (44634 lines/second) Physical Source Lines of Code (SLOC) = 7495 Hits@level = [0] 60 [1] 26 [2] 88 [3] 3 [4] 32 [5] 0 Hits@level+ = [0+] 209 [1+] 149 [2+] 123 [3+] 35 [4+] 32 [5+] 0 Hits/KSLOC@level+ = [0+] 27.8853 [1+] 19.8799 [2+] 16.4109 [3+] 4.66978 [4+] 4.26951 [5+] 0 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.