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/gravit-0.5.1+dfsg/src/tool.c
Examining data/gravit-0.5.1+dfsg/src/timer.c
Examining data/gravit-0.5.1+dfsg/src/texture.c
Examining data/gravit-0.5.1+dfsg/src/sse_functions.h
Examining data/gravit-0.5.1+dfsg/src/spawn.c
Examining data/gravit-0.5.1+dfsg/src/sdlk.h
Examining data/gravit-0.5.1+dfsg/src/png_save.c
Examining data/gravit-0.5.1+dfsg/src/osd.c
Examining data/gravit-0.5.1+dfsg/src/main.c
Examining data/gravit-0.5.1+dfsg/src/lua.c
Examining data/gravit-0.5.1+dfsg/src/input.c
Examining data/gravit-0.5.1+dfsg/src/gfx.c
Examining data/gravit-0.5.1+dfsg/src/frame.c
Examining data/gravit-0.5.1+dfsg/src/frame-pp_vector.c
Examining data/gravit-0.5.1+dfsg/src/frame-pp_sse.c
Examining data/gravit-0.5.1+dfsg/src/frame-pp.c
Examining data/gravit-0.5.1+dfsg/src/frame-ot.c
Examining data/gravit-0.5.1+dfsg/src/fps.c
Examining data/gravit-0.5.1+dfsg/src/font.h
Examining data/gravit-0.5.1+dfsg/src/font.c
Examining data/gravit-0.5.1+dfsg/src/console.c
Examining data/gravit-0.5.1+dfsg/src/config.c
Examining data/gravit-0.5.1+dfsg/src/command.h
Examining data/gravit-0.5.1+dfsg/src/command.c
Examining data/gravit-0.5.1+dfsg/src/color.c
Examining data/gravit-0.5.1+dfsg/src/gravit.h

FINAL RESULTS:

data/gravit-0.5.1+dfsg/src/command.c:194: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(cmd[c].description, ptrDesc);
data/gravit-0.5.1+dfsg/src/command.c:1176:5:  [4] (shell) ShellExecute:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    ShellExecute(NULL, "open", "rundll32.exe", "desk.cpl,InstallScreenSaver gravit.scr", NULL, SW_SHOW);
data/gravit-0.5.1+dfsg/src/command.c:1322:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(buf, c->cmd);
data/gravit-0.5.1+dfsg/src/console.c:58:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf (s, f, argptr);
data/gravit-0.5.1+dfsg/src/console.c:279:13:  [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(&conCommand[conCommandPos-1], &conCommand[conCommandPos]);
data/gravit-0.5.1+dfsg/src/console.c:360:5:  [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(conTypedHistory[conTypedHistoryPos], conCommand);
data/gravit-0.5.1+dfsg/src/console.c:383: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(conTypedHistory[conTypedHistoryPos], conCommand);
data/gravit-0.5.1+dfsg/src/console.c:392:5:  [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(conCommand, conTypedHistory[conTypedHistoryPointer]);
data/gravit-0.5.1+dfsg/src/console.c:434:21:  [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(conCompWord, c->cmd);
data/gravit-0.5.1+dfsg/src/console.c:468:5:  [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(conCommand, conCompWordsFoundPtrs[conCompWordsFoundIndex]);
data/gravit-0.5.1+dfsg/src/tool.c:62:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf (buf, format, argptr);
data/gravit-0.5.1+dfsg/src/gravit.h:75:101:  [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.
#       define SCREENSHOT_PATH va("%s/Library/Application Support/com.slowchop.gravit/screenshots", getenv("HOME"))
data/gravit-0.5.1+dfsg/src/gravit.h:76:88:  [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.
#       define SAVE_PATH va("%s/Library/Application Support/com.slowchop.gravit/save", getenv("HOME"))
data/gravit-0.5.1+dfsg/src/gravit.h:78:61:  [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.
#       define SCREENSHOT_PATH va("%s/.gravit/screenshots", getenv("HOME"))
data/gravit-0.5.1+dfsg/src/gravit.h:79:48:  [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.
#       define SAVE_PATH va("%s/.gravit/save", getenv("HOME"))
data/gravit-0.5.1+dfsg/src/main.c:228:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(0));
data/gravit-0.5.1+dfsg/src/tool.c:426:15:  [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.
    homeDir = getenv("HOME");
data/gravit-0.5.1+dfsg/src/tool.c:457:12:  [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.
    user = getenv("HOME");
data/gravit-0.5.1+dfsg/src/command.c:168: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[FILE_CHUNK_SIZE_SMALL];
data/gravit-0.5.1+dfsg/src/command.c:170: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).
    fp = fopen(MISCDIR "/commandhelp.txt", "rb");
data/gravit-0.5.1+dfsg/src/command.c:304: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 cmdbuf[CONSOLE_LENGTH];
data/gravit-0.5.1+dfsg/src/command.c:338: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(c->fVar, &fvar, sizeof(float));
data/gravit-0.5.1+dfsg/src/command.c:348:20:  [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).
            ivar = atoi(args);
data/gravit-0.5.1+dfsg/src/command.c:349: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(c->iVar, &ivar, sizeof(int));
data/gravit-0.5.1+dfsg/src/command.c:630:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (arg && atoi(arg) >= 0) {
data/gravit-0.5.1+dfsg/src/command.c:631:28:  [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).
        new_target_frame = atoi(arg);
data/gravit-0.5.1+dfsg/src/command.c:679:20:  [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).
            skif = atoi(s3);
data/gravit-0.5.1+dfsg/src/command.c:693:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        staf = atoi(s2);
data/gravit-0.5.1+dfsg/src/command.c:694:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        endf = atoi(s2);
data/gravit-0.5.1+dfsg/src/command.c:697:20:  [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).
            skif = atoi(s4);
data/gravit-0.5.1+dfsg/src/command.c:934: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).
        view.frameSkip = atoi(arg);
data/gravit-0.5.1+dfsg/src/command.c:1031: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/gravit-0.5.1+dfsg/src/command.c:1057: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).
        fp = fopen(fileName, "rb");
data/gravit-0.5.1+dfsg/src/command.c:1120: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(&view.colourSpectrum[(view.colourSpectrumSteps-1)*4], &c, sizeof(float)*4);
data/gravit-0.5.1+dfsg/src/command.c:1168: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 systemDir[MAX_PATH];
data/gravit-0.5.1+dfsg/src/command.c:1169: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 currentDir[MAX_PATH];
data/gravit-0.5.1+dfsg/src/command.c:1231: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 *argptr[4];
data/gravit-0.5.1+dfsg/src/command.c:1237:25:  [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).
    timerAdd(argptr[0], atoi(argptr[1]), atoi(argptr[2]), argptr[3]);
data/gravit-0.5.1+dfsg/src/command.c:1237:42:  [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).
    timerAdd(argptr[0], atoi(argptr[1]), atoi(argptr[2]), argptr[3]);
data/gravit-0.5.1+dfsg/src/command.c:1255: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 *argptr[2];
data/gravit-0.5.1+dfsg/src/command.c:1305: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[1000];
data/gravit-0.5.1+dfsg/src/command.c:1323:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(buf, "  ");
data/gravit-0.5.1+dfsg/src/config.c:27: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[FILE_CHUNK_SIZE_SMALL];
data/gravit-0.5.1+dfsg/src/config.c:35: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).
    fp = fopen(filename, "rb");
data/gravit-0.5.1+dfsg/src/console.c:27:1:  [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 conCommand[CONSOLE_LENGTH+1];
data/gravit-0.5.1+dfsg/src/console.c:32:1:  [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 *conTypedHistory[CONSOLE_TYPED_HISTORY];
data/gravit-0.5.1+dfsg/src/console.c:38:1:  [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 conCompWord[CONSOLE_LENGTH+1]; // the current BC
data/gravit-0.5.1+dfsg/src/console.c:40:1:  [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 *conCompWordsFoundPtrs[MAX_COMPLETE_LIST]; // an array of commands starting with BC
data/gravit-0.5.1+dfsg/src/console.c:54: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 s[1024];
data/gravit-0.5.1+dfsg/src/console.c:95: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).
        fp = fopen("meh.txt", "a");
data/gravit-0.5.1+dfsg/src/font.c:37: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 letter[2];
data/gravit-0.5.1+dfsg/src/frame.c:224: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(
data/gravit-0.5.1+dfsg/src/frame.c:297: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(
data/gravit-0.5.1+dfsg/src/frame.c:338: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/gravit-0.5.1+dfsg/src/gfx.c:131:16:  [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.
    skyFile = (char *) skyboxes[sky - 1];
data/gravit-0.5.1+dfsg/src/gfx.c:722: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(sc, pd->col, sizeof(float)*4);
data/gravit-0.5.1+dfsg/src/gfx.c:748: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(sc, pd->col, sizeof(float)*4);
data/gravit-0.5.1+dfsg/src/gravit.h:359: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 fontFile[MAX_FONT_LENGTH];
data/gravit-0.5.1+dfsg/src/gravit.h:601: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 popupTextMessage[255];
data/gravit-0.5.1+dfsg/src/gravit.h:637: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 s[255];
data/gravit-0.5.1+dfsg/src/input.c:463: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(view.lastMousePosition, view.currentMousePosition, sizeof(view.currentMousePosition));
data/gravit-0.5.1+dfsg/src/input.c:467: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(view.lastMousePosition, view.currentMousePosition, sizeof(view.currentMousePosition));
data/gravit-0.5.1+dfsg/src/main.c:58:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(video.fontFile, "Vera.ttf");
data/gravit-0.5.1+dfsg/src/main.c:225: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 currentDirectory[MAX_PATH];
data/gravit-0.5.1+dfsg/src/png_save.c:71:7:  [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).
	fp = fopen(filename, "wb");
data/gravit-0.5.1+dfsg/src/png_save.c:147:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(output, ".png");
data/gravit-0.5.1+dfsg/src/timer.c:30: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[TIMER_NAME_LENGTH];
data/gravit-0.5.1+dfsg/src/timer.c:35: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 command[TIMER_COMMAND_LENGTH];
data/gravit-0.5.1+dfsg/src/tool.c:51: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 string[shitzta][10000];    // in case va is called by nested functions
data/gravit-0.5.1+dfsg/src/tool.c:88: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).
    fp = fopen(fileName, "rb");
data/gravit-0.5.1+dfsg/src/tool.c:159: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).
    fp = fopen(fileName, "wb");
data/gravit-0.5.1+dfsg/src/tool.c:329: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[256];
data/gravit-0.5.1+dfsg/src/tool.c:343: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 buf[MAX_PATH+1];
data/gravit-0.5.1+dfsg/src/tool.c:391: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).
    fp = fopen(path, "rb");
data/gravit-0.5.1+dfsg/src/command.c:186: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).
        ptrDesc[strlen(ptrDesc)-1] = 0;
data/gravit-0.5.1+dfsg/src/command.c:193:37:  [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).
        cmd[c].description = malloc(strlen(ptrDesc)+1);
data/gravit-0.5.1+dfsg/src/command.c:243: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).
    lenString = strlen(string);
data/gravit-0.5.1+dfsg/src/command.c:254: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).
        lenCommand = strlen(c->cmd);
data/gravit-0.5.1+dfsg/src/command.c:275: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).
    lenString = strlen(string);
data/gravit-0.5.1+dfsg/src/command.c:286: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).
        lenCommand = strlen(c->cmd);
data/gravit-0.5.1+dfsg/src/command.c:313:20:  [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).
    stringLength = strlen(string);
data/gravit-0.5.1+dfsg/src/command.c:318:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(cmdbuf, string, CONSOLE_LENGTH);
data/gravit-0.5.1+dfsg/src/command.c:973:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(video.fontFile, arg, MAX_FONT_LENGTH);
data/gravit-0.5.1+dfsg/src/command.c:989:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((script != NULL) && (strlen(script)>0)) {
data/gravit-0.5.1+dfsg/src/command.c:1222:37:  [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).
    ptrs[count-1] = ptrs[count-2] + strlen(ptrs[count-2]) + 1;
data/gravit-0.5.1+dfsg/src/command.c:1262:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(view.popupTextMessage, argptr[1], 255);
data/gravit-0.5.1+dfsg/src/command.c:1316:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        charsPrinted+=strlen(c->cmd);
data/gravit-0.5.1+dfsg/src/command.c:1320: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).
            charsPrinted = strlen(c->cmd);
data/gravit-0.5.1+dfsg/src/command.c:1362: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).
        if (strcmp(&file[strlen(file)-5], ".info"))
data/gravit-0.5.1+dfsg/src/command.c:1371: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).
        file[strlen(file)-5] = 0;
data/gravit-0.5.1+dfsg/src/config.c:45: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).
        int len = strlen(buffer) - 1;
data/gravit-0.5.1+dfsg/src/console.c:73:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(s) >= CONSOLE_LENGTH-1)
data/gravit-0.5.1+dfsg/src/console.c:87:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(con[cpos].s, s, CONSOLE_LENGTH-1);
data/gravit-0.5.1+dfsg/src/console.c:262: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).
            l = strlen(conCommand);
data/gravit-0.5.1+dfsg/src/console.c:263: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).
            for (i = strlen(conCommand); i > conCommandPos-1; i--)
data/gravit-0.5.1+dfsg/src/console.c:347:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (conCommandPos < (signed)strlen(conCommand)) {
data/gravit-0.5.1+dfsg/src/console.c:359:88:  [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).
    conTypedHistory[conTypedHistoryPos] = realloc(conTypedHistory[conTypedHistoryPos], strlen(s)+1);
data/gravit-0.5.1+dfsg/src/console.c:382:92:  [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).
        conTypedHistory[conTypedHistoryPos] = realloc(conTypedHistory[conTypedHistoryPos], strlen(conCommand)+1);
data/gravit-0.5.1+dfsg/src/console.c:393:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    conCommandPos = strlen(conCommand);
data/gravit-0.5.1+dfsg/src/console.c:404:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!strlen(conCommand))
data/gravit-0.5.1+dfsg/src/console.c:408:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(conCompWord) == 0 || strncmp(conCompWord, conCommand, strlen(conCompWord)) != 0) {
data/gravit-0.5.1+dfsg/src/console.c:408:70:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(conCompWord) == 0 || strncmp(conCompWord, conCommand, strlen(conCompWord)) != 0) {
data/gravit-0.5.1+dfsg/src/console.c:413:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        lenString = strlen(conCommand);
data/gravit-0.5.1+dfsg/src/console.c:424: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).
            lenCommand = strlen(c->cmd);
data/gravit-0.5.1+dfsg/src/console.c:438:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    l = strlen(conCompWord);
data/gravit-0.5.1+dfsg/src/console.c:469:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    conCommandPos = strlen(conCommand);
data/gravit-0.5.1+dfsg/src/font.c:201:29:  [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).
    for (i = 0; i < (signed)strlen(word); i++) {
data/gravit-0.5.1+dfsg/src/font.c:220:29:  [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).
    for (i = 0; i < (signed)strlen(s); i++) {
data/gravit-0.5.1+dfsg/src/font.c:252: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).
    for (i = strlen(word) - 1; i >= 0; i--) {
data/gravit-0.5.1+dfsg/src/frame-pp_vector.c:59:77:  [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.
        #define MALLOC_ALIGNED(target, size, alignment) {target =  (float*) memalign(alignment, size);}
data/gravit-0.5.1+dfsg/src/gfx.c:133: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).
    if (skyFile[strlen(skyFile) - 1] == '/') {
data/gravit-0.5.1+dfsg/src/gfx.c:1496: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).
        &&(strncmp(glRenderer, "Gallium ", strlen("Gallium ")) == 0))
data/gravit-0.5.1+dfsg/src/gfx.c:1556: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).
        ||(strncmp(glVendor, "Intel Open Source", strlen("Intel Open Source")) == 0) ) {
data/gravit-0.5.1+dfsg/src/gfx.c:1557:71:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if ((  strncmp(glRenderer, "Mesa DRI Intel(R) Ironlake Mobile", strlen("Mesa DRI Intel(R) Ironlake Mobile")) == 0)
data/gravit-0.5.1+dfsg/src/gfx.c:1558: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).
          || (strncmp(glRenderer, "Mesa DRI Mobile Intel", strlen("Mesa DRI Mobile Intel")) == 0)
data/gravit-0.5.1+dfsg/src/gfx.c:1559:47:  [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).
          || (strncmp(glRenderer, "Gallium ", strlen("Gallium ")) == 0)) {
data/gravit-0.5.1+dfsg/src/gfx.c:1576:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (strncmp(glRenderer, "Gallium ", strlen("Gallium ")) != 0)
data/gravit-0.5.1+dfsg/src/gfx.c:1582: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).
      if (strncmp(glRenderer, "Mesa GLX Indirect", strlen("Mesa GLX Indirect")) == 0) {
data/gravit-0.5.1+dfsg/src/gravit.h:169:72:  [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 sdlCheck() { char *er = SDL_GetError(); if ((er!=NULL) && (strlen(er)>0)) { conAdd(LERR, "SDL Error: %s:%i %s", __FILE__, __LINE__, er); SDL_ClearError(); } }
data/gravit-0.5.1+dfsg/src/gravit.h:171:80:  [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 agarCheck() { const char *aer = AG_GetError(); if ((aer!=NULL) && (strlen(aer)>0)) { conAdd(LERR, "agar Error: %s:%i %s", __FILE__, __LINE__, aer); AG_SetError("%s", "");} }
data/gravit-0.5.1+dfsg/src/input.c:555:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        numbytes = read(0,&key, 1); // = getchar();
data/gravit-0.5.1+dfsg/src/main.c:176:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(view.popupTextMessage, "Welcome to " GRAVIT_VERSION, 255);
data/gravit-0.5.1+dfsg/src/main.c:567:46:  [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 CheckCommand(x) !strncmp(argv[i], x, strlen(x))
data/gravit-0.5.1+dfsg/src/main.c:599: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).
            if (!path || strlen(path) == 0) {
data/gravit-0.5.1+dfsg/src/png_save.c:142: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).
			namelen = strlen(argv[1]);
data/gravit-0.5.1+dfsg/src/png_save.c:146:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(output, argv[1], namelen);
data/gravit-0.5.1+dfsg/src/timer.c:91:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(t->name, name, TIMER_NAME_LENGTH);
data/gravit-0.5.1+dfsg/src/timer.c:92:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(t->command, command, TIMER_COMMAND_LENGTH);
data/gravit-0.5.1+dfsg/src/tool.c:331:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, name, 255);
data/gravit-0.5.1+dfsg/src/tool.c:352: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).
    if (!buf || strlen(buf) == 0) {
data/gravit-0.5.1+dfsg/src/tool.c:371:82:  [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).
    RegSetValueEx(hkResult, variable, 0, REG_SZ, (unsigned char *)value, (DWORD)(strlen(value)+1));

ANALYSIS SUMMARY:

Hits = 131
Lines analyzed = 10685 in approximately 0.34 seconds (31227 lines/second)
Physical Source Lines of Code (SLOC) = 6841
Hits@level = [0]  12 [1]  57 [2]  56 [3]   7 [4]  11 [5]   0
Hits@level+ = [0+] 143 [1+] 131 [2+]  74 [3+]  18 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 20.9034 [1+] 19.1492 [2+] 10.8171 [3+] 2.63119 [4+] 1.60795 [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.