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/lcas-1.3.19/src/grid_credential_handling/gsi_handling/_lcas_gsi_utils.h
Examining data/lcas-1.3.19/src/grid_credential_handling/gsi_handling/_lcas_globus_internal.h
Examining data/lcas-1.3.19/src/grid_credential_handling/gsi_handling/lcas_gsi_utils.c
Examining data/lcas-1.3.19/src/grid_credential_handling/x509_handling/_lcas_x509_utils.h
Examining data/lcas-1.3.19/src/grid_credential_handling/x509_handling/lcas_x509_utils.c
Examining data/lcas-1.3.19/src/lcas_db_read.c
Examining data/lcas-1.3.19/src/lcas_utils.c
Examining data/lcas-1.3.19/src/lcas_log.c
Examining data/lcas-1.3.19/src/lcas_pem.c
Examining data/lcas-1.3.19/src/lcas.c
Examining data/lcas-1.3.19/src/_lcas_db_read.h
Examining data/lcas-1.3.19/src/_lcas_defines.h
Examining data/lcas-1.3.19/src/_lcas_utils.h
Examining data/lcas-1.3.19/src/_lcas_log.h
Examining data/lcas-1.3.19/src/_lcas.h
Examining data/lcas-1.3.19/src/lcas_test.c
Examining data/lcas-1.3.19/interface/lcas.h
Examining data/lcas-1.3.19/interface/lcas_pem.h
Examining data/lcas-1.3.19/interface/lcas_modules.h
Examining data/lcas-1.3.19/interface/lcas_types.h
Examining data/lcas-1.3.19/interface/lcas_defines.h
Examining data/lcas-1.3.19/interface/lcas_utils.h
Examining data/lcas-1.3.19/interface/lcas_log.h
Examining data/lcas-1.3.19/examples/lcas_plugin_example.c

FINAL RESULTS:

data/lcas-1.3.19/src/lcas_log.c:211: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.
    res=vsnprintf(buf,MAX_LOG_BUFFER_SIZE,fmt,pvar);
data/lcas-1.3.19/src/lcas_log.c:288:11:  [4] (format) snprintf:
  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.
    res = snprintf(buf, MAX_LOG_BUFFER_SIZE, fmt, the_string);
data/lcas-1.3.19/src/lcas_log.c:346: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.
    res=vsnprintf(buf,MAX_LOG_BUFFER_SIZE,fmt,pvar);
data/lcas-1.3.19/src/lcas_log.c:461: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.
    res=vsnprintf(buf,MAX_LOG_BUFFER_SIZE,fmt,pvar);
data/lcas-1.3.19/src/lcas_log.c:487: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(tmpbuf, datetime);
data/lcas-1.3.19/src/lcas_log.c:489: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(tmpbuf, buf);
data/lcas-1.3.19/src/lcas_log.c:494: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(tmpbuf, extra_logstr);
data/lcas-1.3.19/src/lcas_log.c:496: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(tmpbuf, buf);
data/lcas-1.3.19/src/lcas_pem.c:151:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lcas_db_file, "%s/%s", LCAS_REQUIRED_DB_PATH, lcas_db_file_env);
data/lcas-1.3.19/src/lcas_test.c:92:25:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define notice2(i,a,b) {sprintf(tmpbuf, a,b); notice(i,tmpbuf);}
data/lcas-1.3.19/src/lcas_test.c:93:27:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define notice3(i,a,b,c) {sprintf(tmpbuf, a,b,c); notice(i,tmpbuf);}
data/lcas-1.3.19/src/lcas_test.c:94:29:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define notice4(i,a,b,c,d) {sprintf(tmpbuf, a,b,c,d); notice(i,tmpbuf);}
data/lcas-1.3.19/src/lcas_test.c:95:26:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define failure2(t,a,b) {sprintf(tmpbuf, a,b); failure(t,tmpbuf);}
data/lcas-1.3.19/src/lcas_test.c:96:28:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define failure3(t,a,b,c) {sprintf(tmpbuf, a,b,c); failure(t,tmpbuf);}
data/lcas-1.3.19/src/lcas_test.c:97:30:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define failure4(t,a,b,c,d) {sprintf(tmpbuf, a,b,c,d); failure(t,tmpbuf);}
data/lcas-1.3.19/src/lcas_utils.c:307:13:  [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(newfilename, prefix);
data/lcas-1.3.19/src/lcas_utils.c:313: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(newfilename, path);
data/lcas-1.3.19/src/lcas_utils.c:321: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(newfilename, suffix);
data/lcas-1.3.19/src/grid_credential_handling/gsi_handling/lcas_gsi_utils.c:129: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.
        globusid = getenv("GLOBUSID");
data/lcas-1.3.19/src/lcas.c:285: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.
    lcas_dir = getenv("LCAS_DIR");
data/lcas-1.3.19/src/lcas.c:286:39:  [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.
    lcas_dir = (lcas_dir ? lcas_dir : getenv("LCAS_ETC_DIR") );
data/lcas-1.3.19/src/lcas.c:289:28:  [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.
    lcas_db_file_default = getenv("LCAS_DB_FILE");
data/lcas-1.3.19/src/lcas.c:329:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                     getenv("LCAS_MODULES_DIR") ? getenv("LCAS_MODULES_DIR") : "(not set)",
data/lcas-1.3.19/src/lcas.c:329:51:  [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.
                     getenv("LCAS_MODULES_DIR") ? getenv("LCAS_MODULES_DIR") : "(not set)",
data/lcas-1.3.19/src/lcas_log.c:144:28:  [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.
    else if ( (debug_env = getenv("LCAS_DEBUG_LEVEL")) )
data/lcas-1.3.19/src/lcas_log.c:178:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ( (logstr_env = getenv("LCAS_LOG_STRING")) != NULL )
data/lcas-1.3.19/src/lcas_log.c:182:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    else if ( (logstr_env = getenv("JOB_REPOSITORY_ID")) != NULL )
data/lcas-1.3.19/src/lcas_log.c:186:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    else if ( (logstr_env = getenv("GATEKEEPER_JM_ID")) != NULL )
data/lcas-1.3.19/src/lcas_pem.c:84:21:  [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.
    lcas_log_file = getenv("LCAS_LOG_FILE");
data/lcas-1.3.19/src/lcas_pem.c:107:23:  [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.
    lcas_log_string = getenv("LCAS_LOG_STRING");
data/lcas-1.3.19/src/lcas_pem.c:127:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ( (lcas_db_file_env = getenv("LCAS_DB_FILE")) != NULL)
data/lcas-1.3.19/src/lcas_pem.c:153:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    lcas_db_file_env = getenv("LCAS_DB_FILE");
data/lcas-1.3.19/src/lcas_utils.c:409:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    lcas_modules_dir=getenv("LCAS_MODULES_DIR");
data/lcas-1.3.19/src/_lcas_db_read.h:75: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                      pluginname[LCAS_MAXPATHLEN+1]; /*!< Name of authorization plugin/module */
data/lcas-1.3.19/src/_lcas_db_read.h:76: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                      pluginargs[LCAS_MAXARGSTRING+1]; /*!< Argument list to be passed to authorization plugin/module */
data/lcas-1.3.19/src/grid_credential_handling/x509_handling/lcas_x509_utils.c:474:19:  [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).
        tmpFile = fopen(output_file, "a");
data/lcas-1.3.19/src/lcas.c:189: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                      pluginname[LCAS_MAXPATHLEN+1]; /*!< name of plugin */
data/lcas-1.3.19/src/lcas.c:190: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                      pluginargs[LCAS_MAXARGSTRING+1]; /*!< argument string */
data/lcas-1.3.19/src/lcas.c:192: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 *                    argv[LCAS_MAXARGS]; /*!< list of arguments */
data/lcas-1.3.19/src/lcas.c:215: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 *            authmods[MAXAUTHMODS][2] = {
data/lcas-1.3.19/src/lcas.c:555: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 *                 names[5]={NULL,NULL,NULL,NULL,NULL};
data/lcas-1.3.19/src/lcas.c:561: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 *                 dbs[5]={NULL,NULL,NULL,NULL,NULL};
data/lcas-1.3.19/src/lcas_db_read.c:117:23:  [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).
    lcas_db_fhandle = fopen(lcas_db_fname, "r");
data/lcas-1.3.19/src/lcas_db_read.c:157: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[1024];
data/lcas-1.3.19/src/lcas_db_read.c:276: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 *            var_val_pairs[MAXPAIRS];
data/lcas-1.3.19/src/lcas_log.c:116:31:  [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).
            if ((lcas_logfp = fopen(path, "a")) == NULL)
data/lcas-1.3.19/src/lcas_log.c:157:23:  [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).
        debug_level = atoi(debug_env);
data/lcas-1.3.19/src/lcas_log.c:207: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[MAX_LOG_BUFFER_SIZE];
data/lcas-1.3.19/src/lcas_log.c:285: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[MAX_LOG_BUFFER_SIZE];
data/lcas-1.3.19/src/lcas_log.c:342: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[MAX_LOG_BUFFER_SIZE];
data/lcas-1.3.19/src/lcas_log.c:452: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[MAX_LOG_BUFFER_SIZE];
data/lcas-1.3.19/src/lcas_log.c:488: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(tmpbuf, " : ");
data/lcas-1.3.19/src/lcas_log.c:495: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(tmpbuf, " : ");
data/lcas-1.3.19/src/lcas_test.c:91: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     tmpbuf[1024];
data/lcas-1.3.19/src/lcas_utils.c:576: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(*arg,pp,qp - pp);
data/lcas-1.3.19/src/lcas.c:309:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(lcas_mod_entry.pluginname,authmods[i][0],LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas.c:314:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(lcas_mod_entry.pluginargs,authmods[i][1],LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas.c:341: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).
        if (strlen(ihandle->pluginname) > 0)
data/lcas-1.3.19/src/lcas.c:378: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).
        if (strlen(ihandle->pluginname) > 0)
data/lcas-1.3.19/src/lcas.c:600: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(db) > 0)
data/lcas-1.3.19/src/lcas.c:715:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pplugin->pluginname,pname,LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas.c:719:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
        strncpy(pplugin->pluginname,"",LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas.c:723:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pplugin->pluginargs,args,LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas.c:727:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
        strncpy(pplugin->pluginargs,"",LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas.c:824: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).
    len=strlen(name);
data/lcas-1.3.19/src/lcas.c:829:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(xargv[0],name,len+1);
data/lcas-1.3.19/src/lcas_db_read.c:242:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(plist->pluginname,entry->pluginname,LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas_db_read.c:246:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
        strncpy(plist->pluginname,"",LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas_db_read.c:250:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(plist->pluginargs,entry->pluginargs,LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas_db_read.c:254:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
        strncpy(plist->pluginargs,"",LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas_db_read.c:362:42:  [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(var,"pluginname",strlen("pluginname")) == 0)
data/lcas-1.3.19/src/lcas_db_read.c:365:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(tmp_entry->pluginname,val,LCAS_MAXPATHLEN);
data/lcas-1.3.19/src/lcas_db_read.c:368: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).
            else if (strncmp(var,"pluginargs",strlen("pluginargs")) == 0)
data/lcas-1.3.19/src/lcas_db_read.c:371:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(tmp_entry->pluginargs,val,LCAS_MAXARGSTRING);
data/lcas-1.3.19/src/lcas_log.c:149: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).
        for (j = 0; j < strlen(debug_env); j++)
data/lcas-1.3.19/src/lcas_log.c:486:36:  [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).
        tmpbuf = (char *) malloc ((strlen(datetime) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_log.c:486: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).
        tmpbuf = (char *) malloc ((strlen(datetime) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_log.c:486:69:  [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).
        tmpbuf = (char *) malloc ((strlen(datetime) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_log.c:493:36:  [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).
        tmpbuf = (char *) malloc ((strlen(extra_logstr) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_log.c:493: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).
        tmpbuf = (char *) malloc ((strlen(extra_logstr) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_log.c:493:73:  [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).
        tmpbuf = (char *) malloc ((strlen(extra_logstr) + strlen(buf) + strlen(" : ")) * sizeof(char) + 1);
data/lcas-1.3.19/src/lcas_pem.c:98: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).
    string_size = strlen(LCAS_LOG_STRING) + strlen(": ") + 19 + 1;
data/lcas-1.3.19/src/lcas_pem.c:98:45:  [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).
    string_size = strlen(LCAS_LOG_STRING) + strlen(": ") + 19 + 1;
data/lcas-1.3.19/src/lcas_pem.c:150:36:  [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).
    lcas_db_file = (char *) malloc(strlen(LCAS_REQUIRED_DB_PATH) + 2 + strlen(lcas_db_file_env));
data/lcas-1.3.19/src/lcas_pem.c:150: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).
    lcas_db_file = (char *) malloc(strlen(LCAS_REQUIRED_DB_PATH) + 2 + strlen(lcas_db_file_env));
data/lcas-1.3.19/src/lcas_utils.c:298: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).
    prefixl = strlen(prefix);
data/lcas-1.3.19/src/lcas_utils.c:299: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).
    pathl   =  strlen(path);
data/lcas-1.3.19/src/lcas_utils.c:300: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).
    suffixl  =  strlen(suffix); 
data/lcas-1.3.19/src/lcas_utils.c:310:17:  [1] (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 character.
                strcat(newfilename, "/");
data/lcas-1.3.19/src/lcas_utils.c:319:13:  [1] (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 character.
            strcat(newfilename, "/");

ANALYSIS SUMMARY:

Hits = 90
Lines analyzed = 6906 in approximately 0.31 seconds (22013 lines/second)
Physical Source Lines of Code (SLOC) = 2870
Hits@level = [0]  53 [1]  35 [2]  22 [3]  15 [4]  18 [5]   0
Hits@level+ = [0+] 143 [1+]  90 [2+]  55 [3+]  33 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 49.8258 [1+] 31.3589 [2+] 19.1638 [3+] 11.4983 [4+] 6.27178 [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.