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/python-drizzle-1.13.1/src/cdrizzleapi.c
Examining data/python-drizzle-1.13.1/src/cdrizzleblot.c
Examining data/python-drizzle-1.13.1/src/cdrizzleblot.h
Examining data/python-drizzle-1.13.1/src/cdrizzlebox.c
Examining data/python-drizzle-1.13.1/src/cdrizzlebox.h
Examining data/python-drizzle-1.13.1/src/cdrizzlemap.c
Examining data/python-drizzle-1.13.1/src/cdrizzlemap.h
Examining data/python-drizzle-1.13.1/src/cdrizzleutil.c
Examining data/python-drizzle-1.13.1/src/cdrizzleutil.h
Examining data/python-drizzle-1.13.1/src/driz_portability.h
Examining data/python-drizzle-1.13.1/src/tests/drizzletest.h
Examining data/python-drizzle-1.13.1/src/tests/fct.h
Examining data/python-drizzle-1.13.1/src/tests/pandokia_fct.h
Examining data/python-drizzle-1.13.1/src/tests/utest_cdrizzle.c

FINAL RESULTS:

data/python-drizzle-1.13.1/src/cdrizzleutil.c:53:9:  [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.
  (void)vsnprintf(error->last_message, MAX_DRIZ_ERROR_LEN, format, argp);
data/python-drizzle-1.13.1/src/tests/fct.h:288:13:  [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.
    count = vsnprintf(buffer, buffer_len, format, args);
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:86:6:  [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.
	d = getenv("PDK_DIRECTORY");
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:199:20:  [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.
	l->pdk_log_name = getenv("PDK_LOG");
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:208:18:  [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.
	l->pdk_prefix = getenv("PDK_TESTPREFIX");
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:216:16:  [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.
	l->pdk_file = getenv("PDK_FILE");
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:249:6:  [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.
	s = getenv("PDK_FILE");
data/python-drizzle-1.13.1/src/cdrizzlemap.c:41:3:  [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(str, "(%10f,%10f) - (%10f,%10f) [%2d]",
data/python-drizzle-1.13.1/src/cdrizzleutil.h:26:3:  [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 last_message[MAX_DRIZ_ERROR_LEN];
data/python-drizzle-1.13.1/src/cdrizzleutil.h:187: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).
    handle = fopen("/tmp/drizzle.log", "a");
data/python-drizzle-1.13.1/src/cdrizzleutil.h:244:3:  [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[64];
data/python-drizzle-1.13.1/src/cdrizzleutil.h:252:5:  [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(buffer, "Point [%d,%d] is outside of [%d, %d]",
data/python-drizzle-1.13.1/src/tests/fct.h:597: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 line[FCT_DOTTED_MAX_LEN];
data/python-drizzle-1.13.1/src/tests/fct.h:604: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(line, startwith, sizeof(char)*line_len);
data/python-drizzle-1.13.1/src/tests/fct.h:844: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 cndtn[FCT_MAX_LOG_LINE];
data/python-drizzle-1.13.1/src/tests/fct.h:847: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 file[FCT_MAX_LOG_LINE];
data/python-drizzle-1.13.1/src/tests/fct.h:856: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 msg[FCT_MAX_LOG_LINE];
data/python-drizzle-1.13.1/src/tests/fct.h:939: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[FCT_MAX_NAME];
data/python-drizzle-1.13.1/src/tests/fct.h:1114: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[FCT_MAX_NAME];
data/python-drizzle-1.13.1/src/tests/fct.h:1230: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 setup_testname[FCT_MAX_LOG_LINE+1] = {'\0'};
data/python-drizzle-1.13.1/src/tests/fct.h:1565: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 error_msg[FCT_CLP_MAX_ERR_MSG_LEN];
data/python-drizzle-1.13.1/src/tests/fct.h:2595: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/python-drizzle-1.13.1/src/tests/fct.h:2875: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 msg[256] = {'\0'};
data/python-drizzle-1.13.1/src/tests/fct.h:3054: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 std_buffer[1024];
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:112:2:  [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 std_buffer[16384];
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:204:15:  [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).
	l->pdk_log = fopen(l->pdk_log_name,"a");
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:374:22:  [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).
		pandokia_okfile_fp=fopen(okfile_name,"w");
data/python-drizzle-1.13.1/src/tests/utest_cdrizzle.c:228: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 *axis[2] = {"x", "y"};
data/python-drizzle-1.13.1/src/tests/utest_cdrizzle.c:294:18:  [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).
        logptr = fopen(log_file, "a");
data/python-drizzle-1.13.1/src/cdrizzleutil.c:39:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(error->last_message, message, MAX_DRIZ_ERROR_LEN);
data/python-drizzle-1.13.1/src/tests/fct.h:218:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#    define _fct_read  read
data/python-drizzle-1.13.1/src/tests/fct.h:267:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dst, src, num);
data/python-drizzle-1.13.1/src/tests/fct.h:315: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).
    klen = strlen(s)+1;
data/python-drizzle-1.13.1/src/tests/fct.h:333: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).
    klen = strlen(s)+1;
data/python-drizzle-1.13.1/src/tests/fct.h:537:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    check_i = strlen(check);
data/python-drizzle-1.13.1/src/tests/fct.h:538:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    str_i = strlen(str);
data/python-drizzle-1.13.1/src/tests/fct.h:569:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    check_i = strlen(check);
data/python-drizzle-1.13.1/src/tests/fct.h:570:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    str_i = strlen(str);
data/python-drizzle-1.13.1/src/tests/fct.h:602: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(startwith);
data/python-drizzle-1.13.1/src/tests/fct.h:1673:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    if ( next_token != NULL && strlen(next_token) > 0 )
data/python-drizzle-1.13.1/src/tests/fct.h:2027: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).
    FCT_ASSERT( strlen(prefix_filter) > 0 && "invalid arg" );
data/python-drizzle-1.13.1/src/tests/fct.h:2030:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    filter_len = strlen(prefix_filter);
data/python-drizzle-1.13.1/src/tests/fct.h:2089:16:  [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).
    FCT_ASSERT(strlen(sel_logger) > 0);
data/python-drizzle-1.13.1/src/tests/fct.h:2247: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).
    FCT_ASSERT( strlen(test_name) > 0 );
data/python-drizzle-1.13.1/src/tests/fct.h:3724: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(s) ==0;
data/python-drizzle-1.13.1/src/tests/fct.h:3733: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(s) >0;
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:366:8:  [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).
 		n = strlen(pandokia_logger_object->pdk_basename) + strlen(pandokia_current_test) + 20;
data/python-drizzle-1.13.1/src/tests/pandokia_fct.h:366:55:  [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).
 		n = strlen(pandokia_logger_object->pdk_basename) + strlen(pandokia_current_test) + 20;
data/python-drizzle-1.13.1/src/tests/utest_cdrizzle.c:293: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(log_file)) {

ANALYSIS SUMMARY:

Hits = 49
Lines analyzed = 9678 in approximately 0.26 seconds (37272 lines/second)
Physical Source Lines of Code (SLOC) = 6607
Hits@level = [0]  66 [1]  20 [2]  22 [3]   5 [4]   2 [5]   0
Hits@level+ = [0+] 115 [1+]  49 [2+]  29 [3+]   7 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 17.4058 [1+] 7.41638 [2+] 4.38928 [3+] 1.05948 [4+] 0.302709 [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.