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/librest-0.8.1/examples/continuous-twitter.c
Examining data/librest-0.8.1/examples/dump-xml.c
Examining data/librest-0.8.1/examples/get-fireeagle-location.c
Examining data/librest-0.8.1/examples/get-flickr-favorites.c
Examining data/librest-0.8.1/examples/lastfm-shout.c
Examining data/librest-0.8.1/examples/post-twitter-media.c
Examining data/librest-0.8.1/examples/post-twitter.c
Examining data/librest-0.8.1/examples/test-raw.c
Examining data/librest-0.8.1/examples/test-xml.c
Examining data/librest-0.8.1/rest-extras/flickr-proxy-call.c
Examining data/librest-0.8.1/rest-extras/flickr-proxy-call.h
Examining data/librest-0.8.1/rest-extras/flickr-proxy-private.h
Examining data/librest-0.8.1/rest-extras/flickr-proxy.c
Examining data/librest-0.8.1/rest-extras/flickr-proxy.h
Examining data/librest-0.8.1/rest-extras/lastfm-proxy-call.c
Examining data/librest-0.8.1/rest-extras/lastfm-proxy-call.h
Examining data/librest-0.8.1/rest-extras/lastfm-proxy-private.h
Examining data/librest-0.8.1/rest-extras/lastfm-proxy.c
Examining data/librest-0.8.1/rest-extras/lastfm-proxy.h
Examining data/librest-0.8.1/rest-extras/test-runner.c
Examining data/librest-0.8.1/rest-extras/youtube-proxy-private.h
Examining data/librest-0.8.1/rest-extras/youtube-proxy.c
Examining data/librest-0.8.1/rest-extras/youtube-proxy.h
Examining data/librest-0.8.1/rest/glib-compat.c
Examining data/librest-0.8.1/rest/glib-compat.h
Examining data/librest-0.8.1/rest/oauth-proxy-call.c
Examining data/librest-0.8.1/rest/oauth-proxy-call.h
Examining data/librest-0.8.1/rest/oauth-proxy-private.h
Examining data/librest-0.8.1/rest/oauth-proxy.c
Examining data/librest-0.8.1/rest/oauth-proxy.h
Examining data/librest-0.8.1/rest/oauth2-proxy-call.c
Examining data/librest-0.8.1/rest/oauth2-proxy-call.h
Examining data/librest-0.8.1/rest/oauth2-proxy-private.h
Examining data/librest-0.8.1/rest/oauth2-proxy.c
Examining data/librest-0.8.1/rest/oauth2-proxy.h
Examining data/librest-0.8.1/rest/rest-main.c
Examining data/librest-0.8.1/rest/rest-param.c
Examining data/librest-0.8.1/rest/rest-param.h
Examining data/librest-0.8.1/rest/rest-params.c
Examining data/librest-0.8.1/rest/rest-params.h
Examining data/librest-0.8.1/rest/rest-private.h
Examining data/librest-0.8.1/rest/rest-proxy-auth-private.h
Examining data/librest-0.8.1/rest/rest-proxy-auth.c
Examining data/librest-0.8.1/rest/rest-proxy-auth.h
Examining data/librest-0.8.1/rest/rest-proxy-call-private.h
Examining data/librest-0.8.1/rest/rest-proxy-call.c
Examining data/librest-0.8.1/rest/rest-proxy-call.h
Examining data/librest-0.8.1/rest/rest-proxy.c
Examining data/librest-0.8.1/rest/rest-proxy.h
Examining data/librest-0.8.1/rest/rest-xml-node.c
Examining data/librest-0.8.1/rest/rest-xml-node.h
Examining data/librest-0.8.1/rest/rest-xml-parser.c
Examining data/librest-0.8.1/rest/rest-xml-parser.h
Examining data/librest-0.8.1/rest/sha1.c
Examining data/librest-0.8.1/rest/sha1.h
Examining data/librest-0.8.1/rest/test-runner.c
Examining data/librest-0.8.1/tests/custom-serialize.c
Examining data/librest-0.8.1/tests/flickr.c
Examining data/librest-0.8.1/tests/lastfm.c
Examining data/librest-0.8.1/tests/oauth-async.c
Examining data/librest-0.8.1/tests/oauth.c
Examining data/librest-0.8.1/tests/oauth2.c
Examining data/librest-0.8.1/tests/proxy-continuous.c
Examining data/librest-0.8.1/tests/proxy.c
Examining data/librest-0.8.1/tests/threaded.c
Examining data/librest-0.8.1/tests/xml.c

FINAL RESULTS:

data/librest-0.8.1/rest/oauth-proxy-call.c:278:30:  [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.
  s = g_strdup_printf ("%u", g_random_int ());
data/librest-0.8.1/examples/continuous-twitter.c:43: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 pin[256];
data/librest-0.8.1/examples/get-fireeagle-location.c:33: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 pin[256];
data/librest-0.8.1/examples/post-twitter-media.c:34: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 pin[256];
data/librest-0.8.1/examples/post-twitter.c:32: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 pin[256];
data/librest-0.8.1/rest-extras/flickr-proxy.c:363:26:  [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).
                         atoi (rest_xml_node_get_attr (node, "code")),
data/librest-0.8.1/rest-extras/lastfm-proxy.c:335:26:  [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).
                         atoi (rest_xml_node_get_attr (node, "code")),
data/librest-0.8.1/rest/sha1.c:81: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 (ipad, real_key, key_length);
data/librest-0.8.1/rest/sha1.c:82: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 (opad, real_key, key_length);
data/librest-0.8.1/tests/proxy.c:78:16:  [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).
      status = atoi (value);
data/librest-0.8.1/examples/get-flickr-favorites.c:130:5:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    getchar ();
data/librest-0.8.1/examples/lastfm-shout.c:125:5:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    getchar ();
data/librest-0.8.1/rest-extras/youtube-proxy.c:384: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).
                                   strlen(atom_xml),
data/librest-0.8.1/rest/rest-param.c:197:44:  [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).
                              use, string, strlen (string) + 1,
data/librest-0.8.1/rest/rest-xml-parser.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).
    len = strlen (data);
data/librest-0.8.1/rest/sha1.c:56: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 (key) > SHA1_BLOCK_SIZE) {
data/librest-0.8.1/rest/sha1.c:61:48:  [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).
    g_checksum_update (checksum, (guchar*)key, strlen (key));
data/librest-0.8.1/rest/sha1.c:68: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).
    key_length = strlen (key);
data/librest-0.8.1/rest/sha1.c:92:50:  [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).
  g_checksum_update (checksum, (guchar*)message, strlen (message));
data/librest-0.8.1/tests/custom-serialize.c:72: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).
  *content_len = strlen (*content);
data/librest-0.8.1/tests/proxy.c:59: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).
                               value, strlen (value));
data/librest-0.8.1/tests/proxy.c:69: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).
                               value, strlen (value));
data/librest-0.8.1/tests/xml.c:41:61:  [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).
  root = rest_xml_parser_parse_from_data (parser, TEST_XML, strlen (TEST_XML));

ANALYSIS SUMMARY:

Hits = 23
Lines analyzed = 11724 in approximately 0.30 seconds (39501 lines/second)
Physical Source Lines of Code (SLOC) = 6789
Hits@level = [0]   0 [1]  13 [2]   9 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  23 [1+]  23 [2+]  10 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 3.38783 [1+] 3.38783 [2+] 1.47297 [3+] 0.147297 [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.