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/yelp-3.38.1/src/yelp-window.h
Examining data/yelp-3.38.1/src/yelp-application.c
Examining data/yelp-3.38.1/src/yelp-application.h
Examining data/yelp-3.38.1/src/yelp.c
Examining data/yelp-3.38.1/src/yelp-window.c
Examining data/yelp-3.38.1/libyelp/yelp-help-list.c
Examining data/yelp-3.38.1/libyelp/yelp-bookmarks.c
Examining data/yelp-3.38.1/libyelp/yelp-sqlite-storage.c
Examining data/yelp-3.38.1/libyelp/yelp-uri-builder.c
Examining data/yelp-3.38.1/libyelp/yelp-uri.h
Examining data/yelp-3.38.1/libyelp/yelp-error.h
Examining data/yelp-3.38.1/libyelp/yelp-bookmarks.h
Examining data/yelp-3.38.1/libyelp/yelp-bz2-decompressor.h
Examining data/yelp-3.38.1/libyelp/yelp-man-parser.h
Examining data/yelp-3.38.1/libyelp/yelp-help-list.h
Examining data/yelp-3.38.1/libyelp/yelp-man-document.c
Examining data/yelp-3.38.1/libyelp/yelp-docbook-document.h
Examining data/yelp-3.38.1/libyelp/yelp-magic-decompressor.h
Examining data/yelp-3.38.1/libyelp/yelp-settings.c
Examining data/yelp-3.38.1/libyelp/yelp-bz2-decompressor.c
Examining data/yelp-3.38.1/libyelp/yelp-document.c
Examining data/yelp-3.38.1/libyelp/yelp-lzma-decompressor.h
Examining data/yelp-3.38.1/libyelp/yelp-info-document.c
Examining data/yelp-3.38.1/libyelp/yelp-mallard-document.h
Examining data/yelp-3.38.1/libyelp/yelp-sqlite-storage.h
Examining data/yelp-3.38.1/libyelp/yelp-search-entry.h
Examining data/yelp-3.38.1/libyelp/yelp-debug.h
Examining data/yelp-3.38.1/libyelp/yelp-magic-decompressor.c
Examining data/yelp-3.38.1/libyelp/yelp-storage.c
Examining data/yelp-3.38.1/libyelp/yelp-search-entry.c
Examining data/yelp-3.38.1/libyelp/yelp-settings.h
Examining data/yelp-3.38.1/libyelp/yelp-uri.c
Examining data/yelp-3.38.1/libyelp/yelp-document.h
Examining data/yelp-3.38.1/libyelp/yelp-debug.c
Examining data/yelp-3.38.1/libyelp/yelp-lzma-decompressor.c
Examining data/yelp-3.38.1/libyelp/yelp-transform.h
Examining data/yelp-3.38.1/libyelp/yelp-transform.c
Examining data/yelp-3.38.1/libyelp/yelp-man-document.h
Examining data/yelp-3.38.1/libyelp/yelp-view.h
Examining data/yelp-3.38.1/libyelp/web-extension/yelp-web-extension.c
Examining data/yelp-3.38.1/libyelp/yelp-mallard-document.c
Examining data/yelp-3.38.1/libyelp/yelp-storage.h
Examining data/yelp-3.38.1/libyelp/yelp-docbook-document.c
Examining data/yelp-3.38.1/libyelp/yelp-simple-document.c
Examining data/yelp-3.38.1/libyelp/yelp-info-document.h
Examining data/yelp-3.38.1/libyelp/yelp-uri-builder.h
Examining data/yelp-3.38.1/libyelp/yelp-simple-document.h
Examining data/yelp-3.38.1/libyelp/yelp-error.c
Examining data/yelp-3.38.1/libyelp/yelp-man-parser.c
Examining data/yelp-3.38.1/libyelp/yelp-info-parser.c
Examining data/yelp-3.38.1/libyelp/yelp-info-parser.h
Examining data/yelp-3.38.1/libyelp/yelp-view.c
Examining data/yelp-3.38.1/tests/test-bz2.c
Examining data/yelp-3.38.1/tests/test-magic.c
Examining data/yelp-3.38.1/tests/test-view.c
Examining data/yelp-3.38.1/tests/test-uri.c
Examining data/yelp-3.38.1/tests/test-lzma.c
Examining data/yelp-3.38.1/tests/test-settings.c
Examining data/yelp-3.38.1/tests/test-transform.c

FINAL RESULTS:

data/yelp-3.38.1/libyelp/yelp-debug.c:174:3:  [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.
		access (str, F_OK);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:500:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    (sscanf (parser->buffer, (fmt), __VA_ARGS__) != (num))
data/yelp-3.38.1/tests/test-transform.c:168:12:  [3] (random) g_rand_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.
	timeout = g_rand_int_range (rand, 80, 280);
data/yelp-3.38.1/libyelp/yelp-docbook-document.c:560:32:  [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).
                    gint max = atoi ((gchar *) cur->content);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:495:21:  [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).
			offset = (gsize) atoi (items[1]);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:523:4:  [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 (composite + offset + 1, pages[1], plength);
data/yelp-3.38.1/libyelp/yelp-magic-decompressor.c:165: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 (outbuf, inbuf, txfer_size);
data/yelp-3.38.1/libyelp/web-extension/yelp-web-extension.c:48: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).
        uri[strlen (doc_uri)] = '\0';
data/yelp-3.38.1/libyelp/web-extension/yelp-web-extension.c:49:26:  [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).
        resource = uri + strlen (doc_uri) + 1;
data/yelp-3.38.1/libyelp/web-extension/yelp-web-extension.c:168:30:  [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).
        tmp = g_new0 (gchar, strlen (popup_link_text) + 1);
data/yelp-3.38.1/libyelp/yelp-document.c:1092:66:  [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).
                    xref_uri = g_strdup_printf ("xref:%s", url + strlen (document->priv->doc_uri) + 1);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:326: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).
  content_len = strlen (content);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:496: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).
			plength = strlen(pages[1]);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:603:12:  [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).
  start += strlen (key);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:936:21:  [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).
          offset += strlen (*ptr);
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1298:40:  [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 (strncmp (link_text, tmp + 1, strlen (link_text)) ||
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1299: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).
          strlen (link_text) + 1 < strlen (tmp + 1)) {
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1299: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 (link_text) + 1 < strlen (tmp + 1)) {
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1441: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).
    if (url[strlen(url)-1] == '.') { /* The 2nd or 3rd sort of link */
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1453: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).
        length = strlen (link) - 1;
data/yelp-3.38.1/libyelp/yelp-info-parser.c:1474:23:  [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).
        zloc = &(lurl[strlen(lurl)-1]);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:758:21:  [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).
    parser->hpos += strlen (parser->buffer+1) * parser->char_width;
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1050:21:  [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).
    guint len_src = strlen (src);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1051:21:  [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).
    guint len_dst = strlen (dst);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1080: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).
    guint len = strlen (text);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1085:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (parser->buffer + 1, text, len + 1);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1175:25:  [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).
    gchar *end = text + strlen(text);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1322:23:  [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 (accumulator->str);
data/yelp-3.38.1/libyelp/yelp-man-parser.c:1348: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).
        len = strlen ((const char*) tmp);
data/yelp-3.38.1/libyelp/yelp-search-entry.c:390:25:  [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 (text == NULL || strlen(text) == 0)
data/yelp-3.38.1/libyelp/yelp-uri-builder.c:82:41:  [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).
  memmove (uri, uri + BOGUS_PREFIX_LEN, strlen (uri) - BOGUS_PREFIX_LEN + 1);
data/yelp-3.38.1/libyelp/yelp-uri-builder.c:87:38:  [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).
    memmove (resource, resource + 1, strlen (resource));
data/yelp-3.38.1/libyelp/yelp-uri-builder.c:91: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).
  path_len = strlen (uri);
data/yelp-3.38.1/libyelp/yelp-uri.c:1062:26:  [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).
                    name[strlen (name) - strlen (man_suffixes[i]) - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1062:42:  [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).
                    name[strlen (name) - strlen (man_suffixes[i]) - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1154: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).
                name[strlen (name) - strlen (infosuffix[suffix_i])] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1154:38:  [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).
                name[strlen (name) - strlen (infosuffix[suffix_i])] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1177: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).
        else if (env[strlen (env)-1] == ':')
data/yelp-3.38.1/libyelp/yelp-uri.c:1481:30:  [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).
                    basename[strlen (basename) - strlen (".info.gz")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1481: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).
                    basename[strlen (basename) - strlen (".info.gz")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1486:30:  [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).
                    basename[strlen (basename) - strlen ("gz") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1486: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).
                    basename[strlen (basename) - strlen ("gz") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1493:30:  [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).
                    basename[strlen (basename) - strlen (".info.bz2")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1493: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).
                    basename[strlen (basename) - strlen (".info.bz2")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1498:30:  [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).
                    basename[strlen (basename) - strlen ("bz2") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1498: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).
                    basename[strlen (basename) - strlen ("bz2") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1505:30:  [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).
                    basename[strlen (basename) - strlen (".info.lzma")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1505: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).
                    basename[strlen (basename) - strlen (".info.lzma")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1510:30:  [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).
                    basename[strlen (basename) - strlen ("lzma") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1510: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).
                    basename[strlen (basename) - strlen ("lzma") - 1] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1517:30:  [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).
                    basename[strlen (basename) - strlen (".info")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1517: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).
                    basename[strlen (basename) - strlen (".info")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1528:30:  [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).
                    basename[strlen (basename) - strlen (".info")] = '\0';
data/yelp-3.38.1/libyelp/yelp-uri.c:1528: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).
                    basename[strlen (basename) - strlen (".info")] = '\0';
data/yelp-3.38.1/libyelp/yelp-view.c:761: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).
    content_length = strlen (contents);
data/yelp-3.38.1/tests/test-uri.c:39:42:  [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_output_stream_write (stream, orig, strlen (orig), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:85:41:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:91:45:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:99:45:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:108:45:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:122:49:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:131:45:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);
data/yelp-3.38.1/tests/test-uri.c:139:45:  [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_output_stream_write (stream, out, strlen (out), NULL, NULL);

ANALYSIS SUMMARY:

Hits = 63
Lines analyzed = 21855 in approximately 0.51 seconds (43189 lines/second)
Physical Source Lines of Code (SLOC) = 16504
Hits@level = [0]  13 [1]  56 [2]   4 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  76 [1+]  63 [2+]   7 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 4.60494 [1+] 3.81726 [2+] 0.42414 [3+] 0.181774 [4+] 0.121183 [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.