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/sdl-kitchensink-1.0.9/examples/example_audio.c
Examining data/sdl-kitchensink-1.0.9/examples/example_complex.c
Examining data/sdl-kitchensink-1.0.9/examples/example_custom.c
Examining data/sdl-kitchensink-1.0.9/examples/example_rwops.c
Examining data/sdl-kitchensink-1.0.9/examples/example_simple.c
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/audio/kitaudio.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/kitdecoder.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/kitlibstate.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/libass.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/kitatlas.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/kitsubtitle.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/kitsubtitlepacket.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/renderers/kitsubass.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/renderers/kitsubimage.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/subtitle/renderers/kitsubrenderer.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/utils/kitbuffer.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/utils/kithelpers.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/utils/kitlog.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/utils/kitringbuffer.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/internal/video/kitvideo.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitchensink.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitcodec.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitconfig.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kiterror.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitformat.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitlib.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitplayer.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitsource.h
Examining data/sdl-kitchensink-1.0.9/include/kitchensink/kitutils.h
Examining data/sdl-kitchensink-1.0.9/src/internal/audio/kitaudio.c
Examining data/sdl-kitchensink-1.0.9/src/internal/kitdecoder.c
Examining data/sdl-kitchensink-1.0.9/src/internal/kitlibstate.c
Examining data/sdl-kitchensink-1.0.9/src/internal/libass.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitatlas.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitsubtitle.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitsubtitlepacket.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/renderers/kitsubass.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/renderers/kitsubimage.c
Examining data/sdl-kitchensink-1.0.9/src/internal/subtitle/renderers/kitsubrenderer.c
Examining data/sdl-kitchensink-1.0.9/src/internal/utils/kitbuffer.c
Examining data/sdl-kitchensink-1.0.9/src/internal/utils/kithelpers.c
Examining data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c
Examining data/sdl-kitchensink-1.0.9/src/internal/video/kitvideo.c
Examining data/sdl-kitchensink-1.0.9/src/kiterror.c
Examining data/sdl-kitchensink-1.0.9/src/kitlib.c
Examining data/sdl-kitchensink-1.0.9/src/kitplayer.c
Examining data/sdl-kitchensink-1.0.9/src/kitsource.c
Examining data/sdl-kitchensink-1.0.9/src/kitutils.c

FINAL RESULTS:

data/sdl-kitchensink-1.0.9/include/kitchensink/internal/utils/kitlog.h:8:18:  [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 LOG(...) fprintf(stderr, __VA_ARGS__); fflush(stderr)
data/sdl-kitchensink-1.0.9/src/kiterror.c:26: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(_error_message, KIT_ERRBUFSIZE, fmt, args);
data/sdl-kitchensink-1.0.9/examples/example_audio.c:36: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 audiobuf[AUDIOBUFFER_SIZE];
data/sdl-kitchensink-1.0.9/examples/example_complex.c:238: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 audiobuf[AUDIOBUFFER_SIZE];
data/sdl-kitchensink-1.0.9/examples/example_custom.c:72:16:  [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 *fd = fopen(filename, "rb");
data/sdl-kitchensink-1.0.9/examples/example_custom.c:152: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 audiobuf[AUDIOBUFFER_SIZE];
data/sdl-kitchensink-1.0.9/examples/example_rwops.c:144: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 audiobuf[AUDIOBUFFER_SIZE];
data/sdl-kitchensink-1.0.9/examples/example_simple.c:137: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 audiobuf[AUDIOBUFFER_SIZE];
data/sdl-kitchensink-1.0.9/include/kitchensink/kitcodec.h:24: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 name[KIT_CODEC_NAME_MAX]; ///< Codec short name, eg. "ogg" or "webm"
data/sdl-kitchensink-1.0.9/include/kitchensink/kitcodec.h:25: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 description[KIT_CODEC_DESC_MAX]; ///< Codec longer, more descriptive name
data/sdl-kitchensink-1.0.9/src/internal/kitdecoder.c:198: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(output, &dec->output, sizeof(Kit_OutputFormat));
data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitatlas.c:154: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(&sources[i], &item->source, sizeof(SDL_Rect));
data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitatlas.c:156: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(&targets[i], &item->target, sizeof(SDL_Rect));
data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitatlas.c:173: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(&item.target, target, sizeof(SDL_Rect));
data/sdl-kitchensink-1.0.9/src/internal/subtitle/kitatlas.c:186: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(&atlas->items[atlas->cur_items++], &item, sizeof(Kit_TextureAtlasItem));
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:56: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((rb->data + rb->wpos), data, len - k);
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:57: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(rb->data, data+(len-k), k);
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:59: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((rb->data + rb->wpos), data, len);
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:75: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, rb->data + rb->rpos, len - k);
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:76: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 + (len - k), rb->data, k);
data/sdl-kitchensink-1.0.9/src/internal/utils/kitringbuffer.c:78: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, rb->data + rb->rpos, len);
data/sdl-kitchensink-1.0.9/src/kiterror.c:12: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 _error_message[KIT_ERRBUFSIZE] = "\0";
data/sdl-kitchensink-1.0.9/src/internal/subtitle/renderers/kitsubass.c:62: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).
                strlen(sub->rects[r]->ass));
data/sdl-kitchensink-1.0.9/src/internal/subtitle/renderers/kitsubass.c:68: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).
                strlen(sub->rects[r]->ass),

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 5754 in approximately 0.16 seconds (35454 lines/second)
Physical Source Lines of Code (SLOC) = 3982
Hits@level = [0]  68 [1]   2 [2]  20 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  92 [1+]  24 [2+]  22 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 23.104 [1+] 6.02712 [2+] 5.52486 [3+] 0.50226 [4+] 0.50226 [5+]   0
Dot directories skipped = 2 (--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.