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/libsixel-1.8.6/converters/img2sixel.c
Examining data/libsixel-1.8.6/converters/malloc_stub.c
Examining data/libsixel-1.8.6/converters/malloc_stub.h
Examining data/libsixel-1.8.6/converters/sixel2png.c
Examining data/libsixel-1.8.6/examples/drawing/main.c
Examining data/libsixel-1.8.6/examples/opengl/main.c
Examining data/libsixel-1.8.6/perl/lib/Image/ppport.h
Examining data/libsixel-1.8.6/php/php_sixel.h
Examining data/libsixel-1.8.6/php/sixel.c
Examining data/libsixel-1.8.6/ruby/ext/libsixel/libsixel.c
Examining data/libsixel-1.8.6/ruby/ext/libsixel/libsixel.h
Examining data/libsixel-1.8.6/src/allocator.c
Examining data/libsixel-1.8.6/src/allocator.h
Examining data/libsixel-1.8.6/src/chunk.c
Examining data/libsixel-1.8.6/src/chunk.h
Examining data/libsixel-1.8.6/src/decoder.c
Examining data/libsixel-1.8.6/src/decoder.h
Examining data/libsixel-1.8.6/src/dither.c
Examining data/libsixel-1.8.6/src/dither.h
Examining data/libsixel-1.8.6/src/encoder.c
Examining data/libsixel-1.8.6/src/encoder.h
Examining data/libsixel-1.8.6/src/frame.c
Examining data/libsixel-1.8.6/src/frame.h
Examining data/libsixel-1.8.6/src/fromgif.c
Examining data/libsixel-1.8.6/src/fromgif.h
Examining data/libsixel-1.8.6/src/frompnm.c
Examining data/libsixel-1.8.6/src/frompnm.h
Examining data/libsixel-1.8.6/src/fromsixel.c
Examining data/libsixel-1.8.6/src/loader.c
Examining data/libsixel-1.8.6/src/loader.h
Examining data/libsixel-1.8.6/src/malloc_stub.c
Examining data/libsixel-1.8.6/src/malloc_stub.h
Examining data/libsixel-1.8.6/src/output.c
Examining data/libsixel-1.8.6/src/output.h
Examining data/libsixel-1.8.6/src/pixelformat.c
Examining data/libsixel-1.8.6/src/pixelformat.h
Examining data/libsixel-1.8.6/src/quant.c
Examining data/libsixel-1.8.6/src/quant.h
Examining data/libsixel-1.8.6/src/rgblookup.h
Examining data/libsixel-1.8.6/src/scale.c
Examining data/libsixel-1.8.6/src/status.c
Examining data/libsixel-1.8.6/src/status.h
Examining data/libsixel-1.8.6/src/stb_image.h
Examining data/libsixel-1.8.6/src/stb_image_write.c
Examining data/libsixel-1.8.6/src/stb_image_write.h
Examining data/libsixel-1.8.6/src/tests.c
Examining data/libsixel-1.8.6/src/tosixel.c
Examining data/libsixel-1.8.6/src/tty.c
Examining data/libsixel-1.8.6/src/tty.h
Examining data/libsixel-1.8.6/src/writer.c
Examining data/libsixel-1.8.6/src/writer.h
Examining data/libsixel-1.8.6/wic/wic.cc

FINAL RESULTS:

data/libsixel-1.8.6/perl/lib/Image/ppport.h:6890:14:  [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.
    retval = vsnprintf(buffer, len, format, ap);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6892:14:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    retval = vsprintf(buffer, format, ap);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6921:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, pat, args);
data/libsixel-1.8.6/src/decoder.c:80:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(p, s);
data/libsixel-1.8.6/src/encoder.c:76:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(p, s);
data/libsixel-1.8.6/src/quant.c:69:21:  [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 quant_trace fprintf
data/libsixel-1.8.6/converters/img2sixel.c:398:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        n = getopt_long(argc, argv, optstring,
data/libsixel-1.8.6/converters/img2sixel.c:401:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        n = getopt(argc, argv, optstring);
data/libsixel-1.8.6/converters/sixel2png.c:169:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        n = getopt_long(argc, argv, optstring,
data/libsixel-1.8.6/converters/sixel2png.c:172:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        n = getopt(argc, argv, optstring);
data/libsixel-1.8.6/src/encoder.c:1159:27:  [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.
    env_default_bgcolor = getenv("SIXEL_BGCOLOR");
data/libsixel-1.8.6/src/encoder.c:1170:27:  [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.
    env_default_ncolors = getenv("SIXEL_COLORS");
data/libsixel-1.8.6/examples/drawing/main.c:123: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(&new_termios, old_termios, sizeof(*old_termios));
data/libsixel-1.8.6/examples/drawing/main.c:224: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 ibuf[256];
data/libsixel-1.8.6/examples/opengl/main.c:339: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 opt[256];
data/libsixel-1.8.6/examples/opengl/main.c:344:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    if (sprintf(opt, "%d", ncolors) <= 0)
data/libsixel-1.8.6/examples/opengl/main.c:405: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(&new_termios, &old_termios, sizeof(old_termios));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:3842:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6745:24:  [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.
		&& (xdigit = strchr((char *) PL_hexdigit, s[1])))
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6967: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(dst + used, src, copy);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6996: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(dst, src, copy);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:7088: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 octbuf[32] = "%123456789ABCDF";
data/libsixel-1.8.6/perl/lib/Image/ppport.h:7158:6:  [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 tmp[2];
data/libsixel-1.8.6/src/chunk.c:57:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/chunk.c:57:27:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/chunk.c:61:28:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memmove(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/chunk.c:151: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(chunk->buffer + chunk->size, ptr, nbytes);
data/libsixel-1.8.6/src/chunk.c:233:10:  [2] (misc) fopen:
  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).
    *f = fopen(filename, "rb");
data/libsixel-1.8.6/src/decoder.c:267:20:  [2] (misc) fopen:
  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).
        input_fp = fopen(decoder->input, "rb");
data/libsixel-1.8.6/src/dither.c:591: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(dither->palette, buf, (size_t)(dither->ncolors * 3));
data/libsixel-1.8.6/src/dither.c:670: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(dither->palette, palette, (size_t)(dither->ncolors * 3));
data/libsixel-1.8.6/src/encoder.c:92: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 components[3];
data/libsixel-1.8.6/src/encoder.c:262: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 hex[SIXEL_OUTPUT_PACKET_SIZE * 2];
data/libsixel-1.8.6/src/encoder.c:744: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 message[message_buffer_size];
data/libsixel-1.8.6/src/encoder.c:776:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(message,
data/libsixel-1.8.6/src/encoder.c:819: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(p, pixbuf, (size_t)(width * height * depth));
data/libsixel-1.8.6/src/encoder.c:846: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[message_buffer_size];
data/libsixel-1.8.6/src/encoder.c:868:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            nwrite = sprintf(buffer, "\033P%d;0;1!z", encoder->macro_number);
data/libsixel-1.8.6/src/encoder.c:870:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            nwrite = sprintf(buffer, "\033P%d;0;1!z", sixel_frame_get_frame_no(frame));
data/libsixel-1.8.6/src/encoder.c:903:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(buffer, "\033[%d*z", sixel_frame_get_frame_no(frame));
data/libsixel-1.8.6/src/encoder.c:1172: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).
        ncolors = atoi(env_default_ncolors); /* may overflow */
data/libsixel-1.8.6/src/encoder.c:1276: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 unit[32];
data/libsixel-1.8.6/src/encoder.c:1292:30:  [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).
            encoder->outfd = open(value,
data/libsixel-1.8.6/src/encoder.c:1307: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).
        encoder->reqcolors = atoi(value);
data/libsixel-1.8.6/src/encoder.c:1576:33:  [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).
        encoder->macro_number = atoi(value);
data/libsixel-1.8.6/src/encoder.c:1609:31:  [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).
        encoder->complexion = atoi(value);
data/libsixel-1.8.6/src/frame.c:42:28:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memmove(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/frame.c:612: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 message[256];
data/libsixel-1.8.6/src/frame.c:626:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            nwrite = sprintf(message,
data/libsixel-1.8.6/src/frame.c:649:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(message,
data/libsixel-1.8.6/src/fromgif.c:59: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.
   unsigned char buffer_start[128];
data/libsixel-1.8.6/src/fromgif.c:81: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.
   unsigned char pal[256][3];
data/libsixel-1.8.6/src/fromgif.c:82: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.
   unsigned char lpal[256][3];
data/libsixel-1.8.6/src/fromgif.c:222: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(frame->pixels, pg->out, frame_size);
data/libsixel-1.8.6/src/fromgif.c:426: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 buffer[256];
data/libsixel-1.8.6/src/fromgif.c:535:17:  [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(buffer, s->img_buffer, (size_t)len);
data/libsixel-1.8.6/src/fromgif.c:561:17:  [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(buffer, s->img_buffer, (size_t)len);
data/libsixel-1.8.6/src/fromgif.c:566:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf((char *)buffer, "missing valid block terminator (unknown code %02x).", c);
data/libsixel-1.8.6/src/fromgif.c:579:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf((char *)buffer, "corrupt GIF (reason: unknown code %02x).", c);
data/libsixel-1.8.6/src/fromgif.c:615: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 message[256];
data/libsixel-1.8.6/src/fromgif.c:633:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(message,
data/libsixel-1.8.6/src/frompnm.c:91: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 message[256];
data/libsixel-1.8.6/src/frompnm.c:94: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 tmp[256];
data/libsixel-1.8.6/src/frompnm.c:164:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(
data/libsixel-1.8.6/src/frompnm.c:183:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(
data/libsixel-1.8.6/src/frompnm.c:210:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(
data/libsixel-1.8.6/src/fromsixel.c:319:13:  [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(alt_buffer + (size_t)width * (size_t)n,
data/libsixel-1.8.6/src/fromsixel.c:330:13:  [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(alt_buffer + (size_t)width * (size_t)n,
data/libsixel-1.8.6/src/loader.c:58:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/loader.c:58:27:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/loader.c:209: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(*result + (cinfo.output_scanline - 1) * row_stride, buffer[0], row_stride);
data/libsixel-1.8.6/src/loader.c:234: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(data, pchunk->buffer, length);
data/libsixel-1.8.6/src/loader.c:823: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 message[256];
data/libsixel-1.8.6/src/loader.c:947:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            nwrite = sprintf(message,
data/libsixel-1.8.6/src/loader.c:1049:13:  [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(frame->pixels, gdk_pixbuf_get_pixels(pixbuf),
data/libsixel-1.8.6/src/loader.c:1053:17:  [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(frame->pixels + frame->width * depth * i,
data/libsixel-1.8.6/src/loader.c:1102:21:  [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(frame->pixels, gdk_pixbuf_get_pixels(pixbuf),
data/libsixel-1.8.6/src/loader.c:1106:25:  [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(frame->pixels + frame->width * depth * i,
data/libsixel-1.8.6/src/output.h:79: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 buffer[1];
data/libsixel-1.8.6/src/pixelformat.c:316: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(dst, src, (size_t)(width * height));
data/libsixel-1.8.6/src/pixelformat.c:335: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:369: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:403: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:437: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:471: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:505: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:539: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:573: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:607: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 dst[3];
data/libsixel-1.8.6/src/pixelformat.c:647: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 dst[3];
data/libsixel-1.8.6/src/quant.c:146: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 message[message_buffer_size];
data/libsixel-1.8.6/src/quant.c:156:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(message,
data/libsixel-1.8.6/src/quant.c:175:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(message,
data/libsixel-1.8.6/src/quant.c:189:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(message,
data/libsixel-1.8.6/src/quant.c:1271: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 new_palette[SIXEL_PALETTE_MAX * 4];
data/libsixel-1.8.6/src/quant.c:1375:30:  [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 copy[max_depth];
data/libsixel-1.8.6/src/quant.c:1398:13:  [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(palette, new_palette, (size_t)(*ncolors * depth));
data/libsixel-1.8.6/src/quant.c:1421:13:  [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(palette, new_palette, (size_t)(*ncolors * depth));
data/libsixel-1.8.6/src/quant.c:1427:30:  [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 copy[max_depth];
data/libsixel-1.8.6/src/rgblookup.h:49:17:  [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 unsigned char gperf_downcase[256] =
data/libsixel-1.8.6/src/status.c:64:8:  [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 g_buffer[1024] = { 0x0 };
data/libsixel-1.8.6/src/status.c:96: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 buffer[1024];
data/libsixel-1.8.6/src/stb_image.h:558:18:  [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.
typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
data/libsixel-1.8.6/src/stb_image.h:1069:10:  [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(temp, row0, bytes_copy);
data/libsixel-1.8.6/src/stb_image.h:1070:10:  [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(row0, row1, bytes_copy);
data/libsixel-1.8.6/src/stb_image.h:1071:10:  [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(row1, temp, bytes_copy);
data/libsixel-1.8.6/src/stb_image.h:1161:8:  [2] (misc) fopen:
  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).
   f = fopen(filename, mode);
data/libsixel-1.8.6/src/stb_image.h:1461:10:  [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(buffer, s->img_buffer, blen);
data/libsixel-1.8.6/src/stb_image.h:1471: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(buffer, s->img_buffer, n);
data/libsixel-1.8.6/src/stb_image.h:2914:32:  [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 const unsigned char tag[5] = {'J','F','I','F','\0'};
data/libsixel-1.8.6/src/stb_image.h:2924:32:  [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 const unsigned char tag[6] = {'A','d','o','b','e','\0'};
data/libsixel-1.8.6/src/stb_image.h:3029:29:  [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 const unsigned char rgb[3] = { 'R', 'G', 'B' };
data/libsixel-1.8.6/src/stb_image.h:4101: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(a->zout, a->zbuffer, len);
data/libsixel-1.8.6/src/stb_image.h:4425:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            case STBI__F_none:         memcpy(cur, raw, nk); break;
data/libsixel-1.8.6/src/stb_image.h:4581:16:  [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(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes,
data/libsixel-1.8.6/src/stb_image.h:5490: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.
   unsigned char raw_data[4] = {0};
data/libsixel-1.8.6/src/stb_image.h:6403:16:  [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( &g->out[pi * 4], &two_back[pi * 4], 4 ); 
data/libsixel-1.8.6/src/stb_image.h:6410:16:  [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( &g->out[pi * 4], &g->background[pi * 4], 4 ); 
data/libsixel-1.8.6/src/stb_image.h:6421: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( g->background, g->out, 4 * g->w * g->h ); 
data/libsixel-1.8.6/src/stb_image.h:6478:22:  [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( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); 
data/libsixel-1.8.6/src/stb_image.h:6565:13:  [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( out + ((layers - 1) * stride), u, stride ); 
data/libsixel-1.8.6/src/stb_image.h:6700:4:  [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[STBI__HDR_BUFLEN];
data/libsixel-1.8.6/src/stb_image.h:6828:4:  [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[STBI__HDR_BUFLEN];
data/libsixel-1.8.6/src/stb_image_write.c:25:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/stb_image_write.c:25:27:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/stb_image_write.c:29:28:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memmove(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/stb_image_write.h:222:14:  [2] (misc) fopen:
  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).
   FILE *f = fopen(filename, "wb");
data/libsixel-1.8.6/src/stb_image_write.h:252:31:  [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 b[2];
data/libsixel-1.8.6/src/stb_image_write.h:258:31:  [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 b[4];
data/libsixel-1.8.6/src/stb_image_write.h:282: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.
   unsigned char arr[3];
data/libsixel-1.8.6/src/stb_image_write.h:289: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.
   unsigned char bg[3] = { 255, 0, 255}, px[3];
data/libsixel-1.8.6/src/stb_image_write.h:517: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.
   unsigned char scanlineheader[4] = { 2, 2, 0, 0 };
data/libsixel-1.8.6/src/stb_image_write.h:518: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.
   unsigned char rgbe[4];
data/libsixel-1.8.6/src/stb_image_write.h:612:7:  [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[128];
data/libsixel-1.8.6/src/stb_image_write.h:616:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      len = sprintf(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
data/libsixel-1.8.6/src/stb_image_write.h:902: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.
   unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };
data/libsixel-1.8.6/src/stb_image_write.h:998:8:  [2] (misc) fopen:
  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).
   f = fopen(filename, "wb");
data/libsixel-1.8.6/src/tosixel.c:98: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(output->buffer,
data/libsixel-1.8.6/src/tosixel.c:115: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(buffer, (void *)value, (size_t)size);
data/libsixel-1.8.6/src/tosixel.c:143:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    pos = sprintf(buffer, "%d", value);
data/libsixel-1.8.6/src/tosixel.c:1316: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 palhitcount[SIXEL_PALETTE_MAX];
data/libsixel-1.8.6/src/tosixel.c:1317: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 palstate[SIXEL_PALETTE_MAX];
data/libsixel-1.8.6/src/tty.c:74:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void) memcpy(new_termios, old_termios, sizeof(*old_termios));
data/libsixel-1.8.6/src/tty.c:170: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[256];
data/libsixel-1.8.6/src/tty.c:276:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        nwrite = sprintf(buffer, "\033[%dS\033[%dA", scroll, scroll);
data/libsixel-1.8.6/src/writer.c:46:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/writer.c:46:27:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memcpy(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/writer.c:50:28:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memmove(d, s, n) (bcopy ((s), (d), (n)))
data/libsixel-1.8.6/src/writer.c:217:21:  [2] (misc) fopen:
  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).
        output_fp = fopen(filename, "wb");
data/libsixel-1.8.6/wic/wic.cc:552: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 buf[256];
data/libsixel-1.8.6/wic/wic.cc:553:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf,
data/libsixel-1.8.6/wic/wic.cc:1253: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 buf[15];
data/libsixel-1.8.6/wic/wic.cc:1254:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "GetFrame[%d]", index);
data/libsixel-1.8.6/converters/malloc_stub.c:74:15:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    *memptr = memalign(alignment, size);
data/libsixel-1.8.6/examples/drawing/main.c:257:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(STDIN_FILENO, ibuf, sizeof(ibuf));
data/libsixel-1.8.6/examples/drawing/main.c:264:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        n = read(STDIN_FILENO, ibuf, sizeof(ibuf));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5335:24:  [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).
  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5343:59:  [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).
#  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5347:59:  [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).
#  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5367:24:  [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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5395:24:  [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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5416:27:  [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).
     sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5438:24:  [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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5466:24:  [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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5487:27:  [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).
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libsixel-1.8.6/perl/lib/Image/ppport.h:5541:65:  [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).
#  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6339: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).
        STRLEN len = strlen(radix);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6923: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).
    return strlen(buffer);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6963: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).
    used = strlen(dst);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6964: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(src);
data/libsixel-1.8.6/perl/lib/Image/ppport.h:6993: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(src);
data/libsixel-1.8.6/php/php_sixel.h:74:89:  [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).
#define PROP_GET_LONG(name)    Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
data/libsixel-1.8.6/php/php_sixel.h:75:87:  [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).
#define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC)
data/libsixel-1.8.6/php/php_sixel.h:77:91:  [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).
#define PROP_GET_DOUBLE(name)    Z_DVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
data/libsixel-1.8.6/php/php_sixel.h:78:91:  [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).
#define PROP_SET_DOUBLE(name, d) zend_update_property_double(_this_ce, _this_zval, #name, strlen(#name), d TSRMLS_CC)
data/libsixel-1.8.6/php/php_sixel.h:80:93:  [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).
#define PROP_GET_STRING(name)    Z_STRVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
data/libsixel-1.8.6/php/php_sixel.h:81:93:  [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).
#define PROP_GET_STRLEN(name)    Z_STRLEN_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
data/libsixel-1.8.6/php/php_sixel.h:82:91:  [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).
#define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC)
data/libsixel-1.8.6/php/php_sixel.h:83:96:  [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).
#define PROP_SET_STRINGL(name, s, l) zend_update_property_stringl(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC)
data/libsixel-1.8.6/src/allocator.c:274:15:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    *memptr = memalign(alignment, size);
data/libsixel-1.8.6/src/decoder.c:78: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).
    p = (char *)sixel_allocator_malloc(allocator, (size_t)(strlen(s) + 1));
data/libsixel-1.8.6/src/encoder.c:74:51:  [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).
    p = (char *)sixel_allocator_malloc(allocator, strlen(s) + 1);
data/libsixel-1.8.6/src/encoder.c:100:28:  [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).
    pcolor = lookup_rgb(s, strlen(s));
data/libsixel-1.8.6/src/encoder.c:878:52:  [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).
        nwrite = sixel_write_callback(buffer, (int)strlen(buffer), &encoder->outfd);
data/libsixel-1.8.6/src/encoder.c:909:52:  [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).
        nwrite = sixel_write_callback(buffer, (int)strlen(buffer), &encoder->outfd);
data/libsixel-1.8.6/src/encoder.c:1434:18:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        parsed = sscanf(value, "%d%2s", &number, unit);
data/libsixel-1.8.6/src/encoder.c:1455:18:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        parsed = sscanf(value, "%d%2s", &number, unit);
data/libsixel-1.8.6/src/malloc_stub.c:74:15:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    *memptr = memalign(alignment, size);
data/libsixel-1.8.6/src/status.c:76: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(message);
data/libsixel-1.8.6/src/status.c:149: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).
            len = strlen(p) + 1;
data/libsixel-1.8.6/src/stb_image.h:346:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   int      (*read)  (void *user,char *data,int size);   // fill 'data' with 'size' bytes.  return number of bytes actually read
data/libsixel-1.8.6/src/stb_image.h:1400:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
data/libsixel-1.8.6/src/stb_image.h:1427:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   if (s->io.read) {
data/libsixel-1.8.6/src/stb_image.h:1443:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   if (s->io.read) {
data/libsixel-1.8.6/src/stb_image.h:1456:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   if (s->io.read) {
data/libsixel-1.8.6/src/stb_image.h:1463:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
data/libsixel-1.8.6/src/tty.c:282: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).
        nwrite = f_write(buffer, (int)strlen(buffer), &outfd);

ANALYSIS SUMMARY:

Hits = 197
Lines analyzed = 38846 in approximately 1.13 seconds (34339 lines/second)
Physical Source Lines of Code (SLOC) = 27864
Hits@level = [0]  78 [1]  44 [2] 141 [3]   6 [4]   6 [5]   0
Hits@level+ = [0+] 275 [1+] 197 [2+] 153 [3+]  12 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 9.86937 [1+] 7.07005 [2+] 5.49096 [3+] 0.430663 [4+] 0.215332 [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.