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/libepc-0.4.6/examples/simple-publisher.c
Examining data/libepc-0.4.6/examples/service-browser.c
Examining data/libepc-0.4.6/examples/lookup-resource.c
Examining data/libepc-0.4.6/examples/consumer-ui.c
Examining data/libepc-0.4.6/examples/list-resources.c
Examining data/libepc-0.4.6/examples/server-credentials.c
Examining data/libepc-0.4.6/examples/publisher-ui.c
Examining data/libepc-0.4.6/tests/framework.h
Examining data/libepc-0.4.6/tests/framework.c
Examining data/libepc-0.4.6/tests/test-dispatcher-local-collision.c
Examining data/libepc-0.4.6/tests/test-consumer-by-info.c
Examining data/libepc-0.4.6/tests/test-publisher-change-name.c
Examining data/libepc-0.4.6/tests/test-consumer-by-name.c
Examining data/libepc-0.4.6/tests/test-dispatcher-rename.c
Examining data/libepc-0.4.6/tests/test-dispatcher-subtypes.c
Examining data/libepc-0.4.6/tests/test-dispatcher-multiple-services.c
Examining data/libepc-0.4.6/tests/test-dispatcher-reset.c
Examining data/libepc-0.4.6/tests/test-publisher-bookmarks.c
Examining data/libepc-0.4.6/tests/test-dispatcher-simple-service.c
Examining data/libepc-0.4.6/tests/test-dispatcher-unique.c
Examining data/libepc-0.4.6/tests/test-progress-hooks.c
Examining data/libepc-0.4.6/tests/test-service-type.c
Examining data/libepc-0.4.6/tests/test-publisher-libsoup-494128.c
Examining data/libepc-0.4.6/tests/test-publisher-unique.c
Examining data/libepc-0.4.6/tests/test-expand-name.c
Examining data/libepc-0.4.6/libepc-ui/progress-window.c
Examining data/libepc-0.4.6/libepc-ui/password-dialog.c
Examining data/libepc-0.4.6/libepc-ui/password-dialog.h
Examining data/libepc-0.4.6/libepc-ui/progress-window.h
Examining data/libepc-0.4.6/libepc/publisher.h
Examining data/libepc-0.4.6/libepc/marshal.c
Examining data/libepc-0.4.6/libepc/consumer.h
Examining data/libepc-0.4.6/libepc/service-type.h
Examining data/libepc-0.4.6/libepc/protocol.c
Examining data/libepc-0.4.6/libepc/contents.c
Examining data/libepc-0.4.6/libepc/service-type.c
Examining data/libepc-0.4.6/libepc/contents.h
Examining data/libepc-0.4.6/libepc/publisher.c
Examining data/libepc-0.4.6/libepc/shell.c
Examining data/libepc-0.4.6/libepc/dispatcher.c
Examining data/libepc-0.4.6/libepc/tls.h
Examining data/libepc-0.4.6/libepc/tls.c
Examining data/libepc-0.4.6/libepc/enums.h
Examining data/libepc-0.4.6/libepc/shell.h
Examining data/libepc-0.4.6/libepc/marshal.h
Examining data/libepc-0.4.6/libepc/enums.c
Examining data/libepc-0.4.6/libepc/service-monitor.c
Examining data/libepc-0.4.6/libepc/consumer.c
Examining data/libepc-0.4.6/libepc/service-info.c
Examining data/libepc-0.4.6/libepc/service-info.h
Examining data/libepc-0.4.6/libepc/protocol.h
Examining data/libepc-0.4.6/libepc/service-monitor.h
Examining data/libepc-0.4.6/libepc/dispatcher.h

FINAL RESULTS:

data/libepc-0.4.6/libepc/publisher.c:1065:19:  [3] (random) g_random_int:
  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.
      gint hash = g_random_int ();
data/libepc-0.4.6/tests/test-consumer-by-info.c:92:52:  [3] (random) g_random_int:
  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.
  test_name  = g_strdup_printf ("%s %x", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-consumer-by-info.c:93:46:  [3] (random) g_random_int:
  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.
  test_path  = g_strdup_printf ("/stuff-%x", g_random_int ());
data/libepc-0.4.6/tests/test-consumer-by-info.c:94:46:  [3] (random) g_random_int:
  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.
  test_key   = g_strdup_printf ("Maman %x",  g_random_int ());
data/libepc-0.4.6/tests/test-consumer-by-info.c:95:46:  [3] (random) g_random_int:
  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.
  test_value = g_strdup_printf ("Bar: %x",   g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-local-collision.c:64:51:  [3] (random) g_random_int:
  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.
  test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-local-collision.c:65:59:  [3] (random) g_random_int:
  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.
  preferred_name = g_strdup_printf ("%s: %08x", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-multiple-services.c:58:15:  [3] (random) g_random_int:
  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.
  gint hash = g_random_int ();
data/libepc-0.4.6/tests/test-dispatcher-rename.c:89:51:  [3] (random) g_random_int:
  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.
  test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-rename.c:90:57:  [3] (random) g_random_int:
  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.
  first_name = g_strdup_printf ("%s: %08x-1", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-rename.c:91:58:  [3] (random) g_random_int:
  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.
  second_name = g_strdup_printf ("%s: %08x-2", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-rename.c:92:57:  [3] (random) g_random_int:
  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.
  third_name = g_strdup_printf ("%s: %08x-3", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-reset.c:64:54:  [3] (random) g_random_int:
  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.
  test_name = g_strdup_printf ("%s: %08x", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-reset.c:65:51:  [3] (random) g_random_int:
  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.
  test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-simple-service.c:61:15:  [3] (random) g_random_int:
  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.
  gint hash = g_random_int ();
data/libepc-0.4.6/tests/test-dispatcher-simple-service.c:65:51:  [3] (random) g_random_int:
  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.
  test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-subtypes.c:69:15:  [3] (random) g_random_int:
  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.
  gint hash = g_random_int ();
data/libepc-0.4.6/tests/test-dispatcher-unique.c:89:50:  [3] (random) g_random_int:
  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.
  test_cookie1 = g_strdup_printf ("%08x-%08x-1", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-unique.c:89:67:  [3] (random) g_random_int:
  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.
  test_cookie1 = g_strdup_printf ("%08x-%08x-1", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-unique.c:90:50:  [3] (random) g_random_int:
  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.
  test_cookie2 = g_strdup_printf ("%08x-%08x-2", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-unique.c:90:67:  [3] (random) g_random_int:
  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.
  test_cookie2 = g_strdup_printf ("%08x-%08x-2", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-dispatcher-unique.c:91:54:  [3] (random) g_random_int:
  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.
  test_name1 = g_strdup_printf ("%s %08x", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-publisher-bookmarks.c:77:10:  [3] (random) g_random_int:
  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.
  hash = g_random_int ();
data/libepc-0.4.6/tests/test-publisher-change-name.c:72:10:  [3] (random) g_random_int:
  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.
  hash = g_random_int ();
data/libepc-0.4.6/tests/test-publisher-unique.c:103:47:  [3] (random) g_random_int:
  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.
  test_cookie = g_strdup_printf ("%08x-%08x", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-publisher-unique.c:103:64:  [3] (random) g_random_int:
  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.
  test_cookie = g_strdup_printf ("%08x-%08x", g_random_int (), g_random_int ());
data/libepc-0.4.6/tests/test-publisher-unique.c:104:53:  [3] (random) g_random_int:
  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.
  test_name = g_strdup_printf ("%s %08x", __FILE__, g_random_int ());
data/libepc-0.4.6/tests/test-publisher-unique.c:105:46:  [3] (random) g_random_int:
  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.
  test_value1 = g_strdup_printf ("Foo %08x", g_random_int ());
data/libepc-0.4.6/tests/test-publisher-unique.c:106:46:  [3] (random) g_random_int:
  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.
  test_value2 = g_strdup_printf ("Bar %08x", g_random_int ());
data/libepc-0.4.6/libepc/consumer.c:1032:7:  [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 (contents, response_data, response_length);
data/libepc-0.4.6/libepc/contents.c:148: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 (cloned_data, data, length);
data/libepc-0.4.6/libepc/publisher.c:2606: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 (title_str, first_str, first_len);
data/libepc-0.4.6/libepc/publisher.c:2607: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 (title_str + first_len, lower_str, lower_len);
data/libepc-0.4.6/libepc/shell.c:90: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).
      level = text ? MAX (0, atoi (text)) : 0;
data/libepc-0.4.6/tests/framework.c:145: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[4096];
data/libepc-0.4.6/libepc/contents.c:113: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).
    length = strlen (data);
data/libepc-0.4.6/libepc/contents.c:145: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).
    length = strlen (data);
data/libepc-0.4.6/libepc/dispatcher.c:350: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).
  gsize len = strlen(key);
data/libepc-0.4.6/libepc/publisher.c:1748: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).
      length = strlen (data);
data/libepc-0.4.6/libepc/publisher.c:2586:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen (str);
data/libepc-0.4.6/libepc/publisher.c:2600: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).
    lower_len = strlen (lower_str);
data/libepc-0.4.6/libepc/service-info.c:256: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).
      gsize len = strlen (name);
data/libepc-0.4.6/libepc/service-type.c:158: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).
  base = type + strlen (type);
data/libepc-0.4.6/libepc/tls.c:409:101:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  epc_tls_check (rc = gnutls_x509_crt_set_dn_by_oid (crt, GNUTLS_OID_X520_COMMON_NAME, 0, hostname, strlen (hostname)));
data/libepc-0.4.6/tests/test-dispatcher-unique.c:119: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).
          36 == strlen (epc_dispatcher_get_cookie (dispatcher3)))

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 14906 in approximately 0.36 seconds (41572 lines/second)
Physical Source Lines of Code (SLOC) = 8944
Hits@level = [0]   0 [1]  10 [2]   6 [3]  29 [4]   0 [5]   0
Hits@level+ = [0+]  45 [1+]  45 [2+]  35 [3+]  29 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.03131 [1+] 5.03131 [2+] 3.91324 [3+] 3.2424 [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.