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/info-beamer-1.0~pre3+dfsg/bin2c.c
Examining data/info-beamer-1.0~pre3+dfsg/font.h
Examining data/info-beamer-1.0~pre3+dfsg/framebuffer.c
Examining data/info-beamer-1.0~pre3+dfsg/framebuffer.h
Examining data/info-beamer-1.0~pre3+dfsg/image.c
Examining data/info-beamer-1.0~pre3+dfsg/image.h
Examining data/info-beamer-1.0~pre3+dfsg/misc.c
Examining data/info-beamer-1.0~pre3+dfsg/misc.h
Examining data/info-beamer-1.0~pre3+dfsg/shader.h
Examining data/info-beamer-1.0~pre3+dfsg/struct.c
Examining data/info-beamer-1.0~pre3+dfsg/struct.h
Examining data/info-beamer-1.0~pre3+dfsg/uthash.h
Examining data/info-beamer-1.0~pre3+dfsg/utlist.h
Examining data/info-beamer-1.0~pre3+dfsg/video.h
Examining data/info-beamer-1.0~pre3+dfsg/vnc.c
Examining data/info-beamer-1.0~pre3+dfsg/vnc.h
Examining data/info-beamer-1.0~pre3+dfsg/video.c
Examining data/info-beamer-1.0~pre3+dfsg/font.c
Examining data/info-beamer-1.0~pre3+dfsg/main.c
Examining data/info-beamer-1.0~pre3+dfsg/shader.c

FINAL RESULTS:

data/info-beamer-1.0~pre3+dfsg/font.c:97: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, INFO("gc'ing font\n"));
data/info-beamer-1.0~pre3+dfsg/framebuffer.c:50: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, INFO("new framebuffer (%dx%d): %u\n"), width, height, *fbo);
data/info-beamer-1.0~pre3+dfsg/framebuffer.c:79:9:  [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, ERROR("too many framebuffers in use\n"));
data/info-beamer-1.0~pre3+dfsg/main.c:191: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, RED("[%s]") " timeout\n", global_node->path);
data/info-beamer-1.0~pre3+dfsg/main.c:304: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, YELLOW("[%s]")" update %c%s\n", node->path, added ? '+' : '-', name);
data/info-beamer-1.0~pre3+dfsg/main.c:769:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer, sizeof(buffer), fmt, ap);
data/info-beamer-1.0~pre3+dfsg/main.c:771: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, GREEN("[%s]")" %s", node->path, buffer);
data/info-beamer-1.0~pre3+dfsg/main.c:797: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, YELLOW("[%s]")" adding new child node %s\n", node->name, name);
data/info-beamer-1.0~pre3+dfsg/main.c:805: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, YELLOW("[%s]")" removing child node %s\n", node->name, child->name);
data/info-beamer-1.0~pre3+dfsg/main.c:1163: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, INFO("resized to %dx%d\n"), width, height);
data/info-beamer-1.0~pre3+dfsg/main.c:1458: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(stdout, VERSION_STRING " (" INFO_URL ")\n");
data/info-beamer-1.0~pre3+dfsg/main.c:1492: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, INFO("chdir %s\n"), root_name);
data/info-beamer-1.0~pre3+dfsg/main.c:1497: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, INFO("root node is %s\n"), root_name);
data/info-beamer-1.0~pre3+dfsg/main.c:1510: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, INFO("tcp/udp port is %d\n"), listen_port);
data/info-beamer-1.0~pre3+dfsg/main.c:1533: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, INFO("initial size is %dx%d\n"), width, height);
data/info-beamer-1.0~pre3+dfsg/main.c:1570: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, INFO("initialization completed\n"));
data/info-beamer-1.0~pre3+dfsg/misc.c:15:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, ap);
data/info-beamer-1.0~pre3+dfsg/uthash.h:250:29:  [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.
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/info-beamer-1.0~pre3+dfsg/video.c:85:9:  [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, ERROR("cannot open video stream %s\n"), filename);
data/info-beamer-1.0~pre3+dfsg/video.c:98:9:  [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, ERROR("cannot find video stream\n"));
data/info-beamer-1.0~pre3+dfsg/video.c:111:9:  [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, ERROR("cannot open codec\n"));
data/info-beamer-1.0~pre3+dfsg/video.c:118: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, INFO("pixel aspect ratio: %d/%d, size: %dx%d buffer size: %dx%d\n"), 
data/info-beamer-1.0~pre3+dfsg/video.c:143: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, INFO("fps: %lf\n"), video->fps);
data/info-beamer-1.0~pre3+dfsg/video.c:150:9:  [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, ERROR("cannot preallocate frames\n"));
data/info-beamer-1.0~pre3+dfsg/video.c:185:9:  [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, ERROR("scale context init failed\n"));
data/info-beamer-1.0~pre3+dfsg/video.c:223:9:  [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, ERROR("incomplete video packet\n"));
data/info-beamer-1.0~pre3+dfsg/video.c:391: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, INFO("gc'ing video: tex id: %d\n"), video->tex);
data/info-beamer-1.0~pre3+dfsg/vnc.c:122:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buffer, sizeof(buffer), fmt, ap);
data/info-beamer-1.0~pre3+dfsg/vnc.c:124: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, CYAN("[vnc@%s:%d]")" %s", vnc->host, vnc->port, buffer);
data/info-beamer-1.0~pre3+dfsg/main.c:1196:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *addr = getenv("INFOBEAMER_ADDR");
data/info-beamer-1.0~pre3+dfsg/main.c:1480:23:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *root_name = realpath(argv[1], NULL);
data/info-beamer-1.0~pre3+dfsg/main.c:1508:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *port = getenv("INFOBEAMER_PORT");
data/info-beamer-1.0~pre3+dfsg/main.c:1521:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    int fullscreen = getenv("INFOBEAMER_FULLSCREEN") != NULL;
data/info-beamer-1.0~pre3+dfsg/main.c:1525:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *new_width = getenv("INFOBEAMER_WIDTH");
data/info-beamer-1.0~pre3+dfsg/main.c:1529:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *new_height = getenv("INFOBEAMER_HEIGHT");
data/info-beamer-1.0~pre3+dfsg/image.c:124:14:  [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[4] = {r * 255, g * 255, b * 255, a * 255 };
data/info-beamer-1.0~pre3+dfsg/main.c:462: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 path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:473: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 path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:484: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 path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:495: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 path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:498:14:  [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).
    int fd = open(path, O_RDONLY);
data/info-beamer-1.0~pre3+dfsg/main.c:766: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 buffer[16384];
data/info-beamer-1.0~pre3+dfsg/main.c:997:9:  [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 child_path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:1076: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.
    static char inotify_buffer[sizeof(struct inotify_event) + PATH_MAX + 1];
data/info-beamer-1.0~pre3+dfsg/main.c:1108:13:  [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 path[PATH_MAX];
data/info-beamer-1.0~pre3+dfsg/main.c:1216: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 buf[1500];
data/info-beamer-1.0~pre3+dfsg/main.c:1369: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 status[64];
data/info-beamer-1.0~pre3+dfsg/main.c:1509: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).
    listen_port = port ? atoi(port) : DEFAULT_PORT;
data/info-beamer-1.0~pre3+dfsg/main.c:1527:17:  [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).
        width = atoi(new_width);
data/info-beamer-1.0~pre3+dfsg/main.c:1531:18:  [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).
        height = atoi(new_height);
data/info-beamer-1.0~pre3+dfsg/shader.c:123: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 log[1024];
data/info-beamer-1.0~pre3+dfsg/struct.c:276:9:  [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(&f, data+pos, size);
data/info-beamer-1.0~pre3+dfsg/struct.c:283:9:  [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(&d, data+pos, size);
data/info-beamer-1.0~pre3+dfsg/vnc.c:119: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 buffer[16384];
data/info-beamer-1.0~pre3+dfsg/bin2c.c:22:16:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((ch = getchar()) != EOF)
data/info-beamer-1.0~pre3+dfsg/main.c:375: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).
    HASH_FIND(by_name, node->childs, name, strlen(name), child);
data/info-beamer-1.0~pre3+dfsg/main.c:436: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).
    HASH_FIND(by_alias, nodes_by_alias, alias, strlen(alias), existing_node);
data/info-beamer-1.0~pre3+dfsg/main.c:453:60:  [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).
    HASH_ADD_KEYPTR(by_alias, nodes_by_alias, node->alias, strlen(node->alias), node);
data/info-beamer-1.0~pre3+dfsg/main.c:506:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t data_size = read(fd, data, LUAL_BUFFERSIZE);
data/info-beamer-1.0~pre3+dfsg/main.c:800:57:  [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).
    HASH_ADD_KEYPTR(by_name, node->childs, child->name, strlen(child->name), child);
data/info-beamer-1.0~pre3+dfsg/main.c:814: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).
    HASH_FIND(by_name, node->childs, name, strlen(name), child);
data/info-beamer-1.0~pre3+dfsg/main.c:864:57:  [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).
    HASH_ADD_KEYPTR(by_path, nodes_by_path, node->path, strlen(node->path), node);
data/info-beamer-1.0~pre3+dfsg/main.c:1036: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).
    size_t needle_size = strlen(needle);
data/info-beamer-1.0~pre3+dfsg/main.c:1078:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        size_t size = read(inotify_fd, &inotify_buffer, sizeof(inotify_buffer));
data/info-beamer-1.0~pre3+dfsg/main.c:1371:34:  [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).
    client_write(client, status, strlen(status));
data/info-beamer-1.0~pre3+dfsg/uthash.h:232:31:  [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).
    HASH_FIND(hh,head,findstr,strlen(findstr),out)
data/info-beamer-1.0~pre3+dfsg/uthash.h:234:31:  [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).
    HASH_ADD(hh,head,strfield,strlen(add->strfield),add)

ANALYSIS SUMMARY:

Hits = 67
Lines analyzed = 5108 in approximately 0.19 seconds (27582 lines/second)
Physical Source Lines of Code (SLOC) = 3970
Hits@level = [0]  24 [1]  13 [2]  19 [3]   6 [4]  29 [5]   0
Hits@level+ = [0+]  91 [1+]  67 [2+]  54 [3+]  35 [4+]  29 [5+]   0
Hits/KSLOC@level+ = [0+] 22.9219 [1+] 16.8766 [2+] 13.602 [3+] 8.81612 [4+] 7.30479 [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.