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/commons-daemon-1.0.15/src/native/unix/native/home.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/java.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/debug.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/signals.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/home.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/dso-dyld.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/location.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/debug.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/version.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/help.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/signals.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/jsvc.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/help.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/locks.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/dso-dlfcn.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/dso.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/arguments.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/replace.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/locks.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/location.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/replace.h
Examining data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/java.c
Examining data/commons-daemon-1.0.15/src/native/unix/native/arguments.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/private.h
Examining data/commons-daemon-1.0.15/src/native/windows/src/handles.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/utils.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/service.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/mclib.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/mclib.h
Examining data/commons-daemon-1.0.15/src/native/windows/src/log.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/console.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/cmdline.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/registry.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/rprocess.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/gui.c
Examining data/commons-daemon-1.0.15/src/native/windows/src/javajni.c
Examining data/commons-daemon-1.0.15/src/native/windows/include/service.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/handles.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/gui.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/console.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/rprocess.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/apxwin.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/cmdline.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/log.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/registry.h
Examining data/commons-daemon-1.0.15/src/native/windows/include/javajni.h
Examining data/commons-daemon-1.0.15/src/native/windows/apps/prunmgr/prunmgr.c
Examining data/commons-daemon-1.0.15/src/native/windows/apps/prunmgr/prunmgr.h
Examining data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.h
Examining data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c
Examining data/commons-daemon-1.0.15/src/samples/Native.c

FINAL RESULTS:

data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1201:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        ret = readlink("/proc/self/exe", buf, sizeof(buf) - 1);
data/commons-daemon-1.0.15/src/native/windows/src/rprocess.c:550:5:  [5] (misc) SetSecurityDescriptorDacl:
  Never create NULL ACLs; an attacker can set it to Everyone (Deny All
  Access), which would even forbid administrator access (CWE-732).
    SetSecurityDescriptorDacl(lpProc->lpSD, -1, 0, 0);
data/commons-daemon-1.0.15/src/native/windows/src/rprocess.c:550:5:  [5] (misc) SetSecurityDescriptorDacl:
  Never create NULL ACLs; an attacker can set it to Everyone (Deny All
  Access), which would even forbid administrator access (CWE-732).
    SetSecurityDescriptorDacl(lpProc->lpSD, -1, 0, 0);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:55: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(ptr, str);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:57: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(ptr, add);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:70: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(jars, pattern);
data/commons-daemon-1.0.15/src/native/unix/native/debug.c:58:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/commons-daemon-1.0.15/src/native/unix/native/debug.c:82:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/commons-daemon-1.0.15/src/native/unix/native/java.c:363:45:  [4] (shell) system:
  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.
    method = (*env)->GetStaticMethodID(env, system, exitclass, exitparams);
data/commons-daemon-1.0.15/src/native/unix/native/java.c:370:39:  [4] (shell) system:
  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.
    (*env)->CallStaticVoidMethod(env, system, method, (jint) exit);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1203: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(buf, argv[0]);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:47: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(new, old);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:73: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(new, old);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:89: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(new, old);
data/commons-daemon-1.0.15/src/native/windows/apps/prunmgr/prunmgr.c:416:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(szB, L"auto");
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1426:17:  [4] (buffer) lstrcpyW:
  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).
                lstrcpyW(jx, szJH);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1427:17:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                lstrcatW(jx, PRSRV_JBIN);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1431:21:  [4] (buffer) lstrcpyW:
  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).
                    lstrcpyW(szJP, szJH);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1432:21:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                    lstrcatW(szJP, PRSRV_PBIN);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1473:17:  [4] (buffer) lstrcpyW:
  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).
                lstrcpyW(jx, szJH);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1474:17:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                lstrcatW(jx, PRSRV_JBIN);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1477:21:  [4] (buffer) lstrcpyW:
  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).
                    lstrcpyW(szJP, szJH);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1478:21:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                    lstrcatW(szJP, PRSRV_PBIN);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:86:5:  [4] (buffer) lstrcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
    lstrcpy(_st_sys_gui.szWndClass, szAppName);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:87:5:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcat(_st_sys_gui.szWndClass, TEXT("_CLASS"));
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:90:5:  [4] (buffer) lstrcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
    lstrcpy(_st_sys_gui.szWndMutex, szAppName);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:91:5:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcat(_st_sys_gui.szWndMutex, TEXT("_MUTEX"));
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:294:13:  [4] (buffer) lstrcpynA:
  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).
            lstrcpynA(nId.szTip, szInfo, 63);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:298:13:  [4] (buffer) lstrcpynA:
  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).
            lstrcpynA(nId.szInfo, szInfo, 255);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:299:13:  [4] (buffer) lstrcpynA:
  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).
            lstrcpynA(nId.szInfoTitle, szInfoTitle, 63);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:330:13:  [4] (buffer) lstrcpynW:
  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).
            lstrcpynW(nId.szTip, szInfo, 63);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:334:13:  [4] (buffer) lstrcpynW:
  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).
            lstrcpynW(nId.szInfo, szInfo, 255);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:335:13:  [4] (buffer) lstrcpynW:
  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).
            lstrcpynW(nId.szInfoTitle, szInfoTitle, 63);
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:737:21:  [4] (buffer) lstrcpyW:
  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).
                    lstrcpyW(szUser, L".\\");
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:746:21:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                    lstrcatW(szUser, L"\\");
data/commons-daemon-1.0.15/src/native/windows/src/handles.c:434:9:  [4] (buffer) lstrcpyA:
  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).
        lstrcpyA(szDest, szSource);
data/commons-daemon-1.0.15/src/native/windows/src/handles.c:448:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(szDest, szSource);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:502:13:  [4] (buffer) lstrcatA:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
            lstrcatA(pOrg, szStr);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:504:13:  [4] (buffer) lstrcatA:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
            lstrcatA(pOrg, szAdd);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:519:5:  [4] (buffer) lstrcpyA:
  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).
    lstrcpyA(szJars, szPattern);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:522:5:  [4] (buffer) lstrcatA:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatA(szPath, szPattern);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:523:5:  [4] (buffer) lstrcatA:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatA(szJars, ".jar");
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:797:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(p, JAVA_CLASSPATH_W);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:798:9:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        lstrcatW(p, szClassPath);
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:803:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(p, szClass);
data/commons-daemon-1.0.15/src/native/windows/src/log.c:332:13:  [4] (buffer) lstrcpyA:
  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).
            lstrcpyA(szBp, "Unknown error code");
data/commons-daemon-1.0.15/src/native/windows/src/log.c:481:13:  [4] (buffer) lstrcatA:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
            lstrcatA(sysbuf, sb);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:249:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(buff, REGSOFTWARE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:251:9:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        lstrcatW(buff, szRoot);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:253:9:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        lstrcatW(buff, REGAPACHE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:254:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(buff, REGSEPARATOR);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:255:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(buff, szKeyName);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:311:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(buff, REGSERVICE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:312:9:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        lstrcatW(buff, szKeyName);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:877:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(buff, szRoot);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:879:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(buff, REGAPACHE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:880:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(buff, REGSEPARATOR);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:936:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wsKey, JAVA_CURRENT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:938:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(wsBuf, JRE_REGKEY);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:940:9:  [4] (buffer) lstrcpyW:
  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).
        lstrcpyW(wsBuf, JDK_REGKEY);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:974:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wsBuf, JRE_REGKEY);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:1074:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wcName, REGSERVICE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:1075:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(wcName, szServiceName);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:1099:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wcName, REGSERVICE_ROOT);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:1100:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(wcName, szServiceName);
data/commons-daemon-1.0.15/src/native/windows/src/registry.c:1123:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wsBuf, CONTROL_REGKEY);
data/commons-daemon-1.0.15/src/native/windows/src/rprocess.c:511:14:  [4] (access) ImpersonateLoggedOnUser:
  If this call fails, the program could fail to drop heightened privileges
  (CWE-250). Make sure the return value is checked, and do not continue if a
  failure is reported.
        if (!ImpersonateLoggedOnUser(hUserToken)) {
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:122:5:  [4] (buffer) lstrcpyW:
  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).
    lstrcpyW(wsAdd, L"PATH=");        
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:123:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(wsAdd, szAdd);        
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:124:5:  [4] (buffer) lstrcatW:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcatW(wsAdd, L";");        
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:290:13:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
            lstrcat(szNew, TEXT(";"));
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:291:13:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
            lstrcat(szNew, szValue);
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:691:5:  [4] (buffer) lstrcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
    lstrcpy(lpBuff, szPrefix);
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:811:9:  [4] (buffer) lstrcpyA:
  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).
        lstrcpyA(p, lpArgs[i]);
data/commons-daemon-1.0.15/src/native/unix/native/home.c:217: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.
        path = getenv("JAVA_HOME");
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1153:25:  [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.
        char *oldpath = getenv("LD_LIBRARY_PATH");
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1197: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.
                      getenv("LD_LIBRARY_PATH"));
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1214: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.
    log_debug("Running w/ LD_LIBRARY_PATH=%s", getenv("LD_LIBRARY_PATH"));
data/commons-daemon-1.0.15/src/native/windows/include/log.h:43:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(_pt_sys_loglock);      \
data/commons-daemon-1.0.15/src/native/windows/src/log.c:180:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&_st_sys_loglock);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:65: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   jars[PATH_MAX + 1];
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:71:5:  [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(jars, ".jar");
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:276:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                args->wait = atoi(temp);
data/commons-daemon-1.0.15/src/native/unix/native/debug.c:41: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/debug.c:70: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/home.c:51: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).
    FILE *cfgf = fopen(data->cfgf, "r");
data/commons-daemon-1.0.15/src/native/unix/native/home.c:53: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[1024];
data/commons-daemon-1.0.15/src/native/unix/native/home.c:95:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char temp[1024];
data/commons-daemon-1.0.15/src/native/unix/native/home.c:96:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char repl[1024];
data/commons-daemon-1.0.15/src/native/unix/native/home.c:138: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[1024];
data/commons-daemon-1.0.15/src/native/unix/native/java.c:138: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 appf[1024];
data/commons-daemon-1.0.15/src/native/unix/native/java.c:154: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 daemonprocid[64];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:559: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:565:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(args->pidf, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:580:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            pid = atoi(buff);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:615:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:617:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(args->pidf, O_RDONLY, 0);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:630:13:  [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).
        i = atoi(buff);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:650: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:656: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(buff, "/tmp/%d.jsvc_up", pid);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:658:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(buff, O_RDONLY);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:667: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:670: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(buff, "/tmp/%d.jsvc_up", (int)getpid());
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:672:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(buff, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:679: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:681: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(buff, "/tmp/%d.jsvc_up", (int)getpid());
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:695: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 buff[80];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:715:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(args->pidf, O_RDONLY);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:726:17:  [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).
            i = atoi(buff);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:919:13:  [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).
    ftest = fopen(outfile, mode);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:937: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[LOGBUF_SIZE];
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1156:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char  buf[2048];
data/commons-daemon-1.0.15/src/native/unix/native/signals.c:57: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[256];
data/commons-daemon-1.0.15/src/native/unix/native/signals.c:63: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(Name, "TERM%ld", GetCurrentProcessId());
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1258:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char pids[32];
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1635: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).
                int us = atoi(argv[1] + 6);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1646: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).
                int us = atoi(argv[2]);
data/commons-daemon-1.0.15/src/native/windows/include/gui.h:111:5:  [2] (buffer) TCHAR:
  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.
    TCHAR   szWndClass[256];
data/commons-daemon-1.0.15/src/native/windows/include/gui.h:112:5:  [2] (buffer) TCHAR:
  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.
    TCHAR   szWndMutex[256];
data/commons-daemon-1.0.15/src/native/windows/src/console.c:55:5:  [2] (buffer) TCHAR:
  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.
    TCHAR   szFontName[32];
data/commons-daemon-1.0.15/src/native/windows/src/gui.c:347:5:  [2] (buffer) TCHAR:
  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.
    TCHAR szApplication[512];
data/commons-daemon-1.0.15/src/native/windows/src/handles.c:410:19:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        int cch = MultiByteToWideChar(CP_UTF8, 0, szSource, -1, NULL, 0);
data/commons-daemon-1.0.15/src/native/windows/src/handles.c:412:14:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        if (!MultiByteToWideChar(CP_UTF8, 0, szSource, -1, szDest, cch)) {
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:138: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 padding[128];
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:513: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       szJars[MAX_PATH + 1];
data/commons-daemon-1.0.15/src/native/windows/src/javajni.c:514: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       szPath[MAX_PATH + 1];
data/commons-daemon-1.0.15/src/native/windows/src/log.c:399:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char tid[1024 + 16];
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:167:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    int cch = MultiByteToWideChar(CP_ACP, 0, cs, -1, NULL, 0);
data/commons-daemon-1.0.15/src/native/windows/src/utils.c:169:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if (!MultiByteToWideChar(CP_ACP, 0, cs, -1, s, cch)) {
data/commons-daemon-1.0.15/src/samples/Native.c:36: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(&i, &i, i);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:45: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).
        nl += strlen(ptr);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:47: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).
        nl += strlen(str);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:49: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).
        nl += strlen(add);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:67: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(pattern) > (sizeof(jars) - 5)) {
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:123: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).
        size_t end = strlen(ptr);
data/commons-daemon-1.0.15/src/native/unix/native/arguments.c:290:23:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
            if (args->umask < 02) {
data/commons-daemon-1.0.15/src/native/unix/native/arguments.h:79:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    int umask;
data/commons-daemon-1.0.15/src/native/unix/native/home.c:73: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).
        pos = strlen(ret);
data/commons-daemon-1.0.15/src/native/unix/native/home.c:88: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(ret) > 0) {
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:577:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        i = read(fd, buff, sizeof(buff));
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:625:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i = read(fd, buff, sizeof(buff));
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:721:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        i = read(fd, buff, sizeof(buff));
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:852:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(envmask);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:971:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    n = read(out_fd, buf, LOGBUF_SIZE-1);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:988:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    n = read(err_fd, buf, LOGBUF_SIZE-1);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1243:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    if (~args->umask & 0022) {
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1245:67:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
                  "write permission to group and/or other", args->umask);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1247:15:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    envmask = umask(args->umask);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1247:27:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    envmask = umask(args->umask);
data/commons-daemon-1.0.15/src/native/unix/native/jsvc-unix.c:1249:72:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    log_debug("Switching umask back to %03o from %03o", envmask, args->umask);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:43:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((mch == NULL) || (strlen(mch) == 0)) {
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:44: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).
        olen = strlen(old);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:56: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).
    olen = strlen(old);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:57: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).
    mlen = strlen(mch);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:58: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).
    rlen = strlen(rpl);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:70: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).
        olen = strlen(old);
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:96: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).
            for (x = (strlen(tmp) + shift); x > shift; x--) {
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:106:32:  [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 (x = mlen; x < strlen(tmp) - shift; x++) {
data/commons-daemon-1.0.15/src/native/unix/native/replace.c:115:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tmp, rpl, rlen);
data/commons-daemon-1.0.15/src/native/windows/apps/prunsrv/prunsrv.c:1274:56:  [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).
                WriteFile(gPidfileHandle, pids, (DWORD)strlen(pids), &wr, NULL);

ANALYSIS SUMMARY:

Hits = 160
Lines analyzed = 17643 in approximately 0.56 seconds (31592 lines/second)
Physical Source Lines of Code (SLOC) = 13713
Hits@level = [0] 119 [1]  30 [2]  50 [3]   6 [4]  71 [5]   3
Hits@level+ = [0+] 279 [1+] 160 [2+] 130 [3+]  80 [4+]  74 [5+]   3
Hits/KSLOC@level+ = [0+] 20.3457 [1+] 11.6678 [2+] 9.48006 [3+] 5.83388 [4+] 5.39634 [5+] 0.218771
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.