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/socket-1.1/patchlevel.h
Examining data/socket-1.1/so_release.c
Examining data/socket-1.1/globals.h
Examining data/socket-1.1/io.c
Examining data/socket-1.1/siglist.c
Examining data/socket-1.1/socket.c
Examining data/socket-1.1/socketp.c
Examining data/socket-1.1/utils.c

FINAL RESULTS:

data/socket-1.1/utils.c:51:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stderr, ustring, progname) ;
data/socket-1.1/utils.c:154:2:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execl("/bin/sh", "sh", "-c", prog, NULL) ;
data/socket-1.1/socket.c:73: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, "B:bcflp:qrsvWw?")) != -1) {
data/socket-1.1/io.c:32: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 input_buffer[BUFSIZ] ;
data/socket-1.1/io.c:68: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 buffer2[2 * BUFSIZ] ;	/* expanding lf's to crlf's can
data/socket-1.1/siglist.c:38: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 *socket_siglist[NSIG];
data/socket-1.1/siglist.c:222: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 (socket_siglist[i], "Unknown Signal #%d", i);
data/socket-1.1/socket.c:238: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 dotted[20] ;
data/socket-1.1/socket.c:244:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			    sprintf(dotted, "%ld.%ld.%ld.%ld",
data/socket-1.1/socketp.c:122:2:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	bcopy(hp->h_addr, (char *) &sa.sin_addr, hp->h_length) ;
data/socket-1.1/socketp.c:179: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).
	port = atoi(name_or_number) ;
data/socket-1.1/utils.c:250:20:  [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 ((nulldev_fd = open(NULL_DEVICE, O_RDWR, 0)) != -1) {
data/socket-1.1/io.c:34:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((size = read(from, input_buffer, BUFSIZ)) == -1) {
data/socket-1.1/siglist.c:220: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).
	    (char *) malloc (10 + strlen ("Unknown Signal #"));
data/socket-1.1/socketp.c:81:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(su.sun_path,pathname,UNIX_PATH_MAX);
data/socket-1.1/socketp.c:153:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(su.sun_path,pathname,UNIX_PATH_MAX);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 1240 in approximately 0.05 seconds (26366 lines/second)
Physical Source Lines of Code (SLOC) = 947
Hits@level = [0]  19 [1]   4 [2]   9 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  35 [1+]  16 [2+]  12 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 36.9588 [1+] 16.8955 [2+] 12.6716 [3+] 3.1679 [4+] 2.11193 [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.