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/gupnp-igd-1.2.0/libgupnp-igd/gupnp-enum-types.c
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-enum-types.h
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd-priv.h
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd-thread.c
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd-thread.h
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd.c
Examining data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd.h
Examining data/gupnp-igd-1.2.0/tests/examples/test-thread.c
Examining data/gupnp-igd-1.2.0/tests/examples/test.c
Examining data/gupnp-igd-1.2.0/tests/gtest/gupnp-simple-igd.c

FINAL RESULTS:

data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd.c:869:34:  [3] (random) g_random_int_range:
  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.
      pm->actual_external_port = g_random_int_range (1025, 65535);
data/gupnp-igd-1.2.0/libgupnp-igd/gupnp-simple-igd.c:319: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.
  unsigned char buf[sizeof(struct in6_addr)];
data/gupnp-igd-1.2.0/tests/examples/test-thread.c:51: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).
  external_port = atoi (argv[1]);
data/gupnp-igd-1.2.0/tests/examples/test-thread.c:52: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).
  internal_port = atoi (argv[3]);
data/gupnp-igd-1.2.0/tests/examples/test.c:66: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).
  external_port = atoi (argv[1]);
data/gupnp-igd-1.2.0/tests/examples/test.c:67: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).
  internal_port = atoi (argv[3]);

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 2654 in approximately 0.10 seconds (27511 lines/second)
Physical Source Lines of Code (SLOC) = 1820
Hits@level = [0]   0 [1]   0 [2]   5 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]   6 [1+]   6 [2+]   6 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 3.2967 [1+] 3.2967 [2+] 3.2967 [3+] 0.549451 [4+]   0 [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.