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/coolkey-1.1.0/src/coolkey/PKCS11Exception.cpp
Examining data/coolkey-1.1.0/src/coolkey/PKCS11Exception.h
Examining data/coolkey-1.1.0/src/coolkey/dllmain.cpp
Examining data/coolkey-1.1.0/src/coolkey/locking.cpp
Examining data/coolkey-1.1.0/src/coolkey/locking.h
Examining data/coolkey-1.1.0/src/coolkey/log.h
Examining data/coolkey-1.1.0/src/coolkey/mypkcs11.h
Examining data/coolkey-1.1.0/src/coolkey/params.h
Examining data/coolkey-1.1.0/src/coolkey/pkcs11.h
Examining data/coolkey-1.1.0/src/coolkey/pkcs11f.h
Examining data/coolkey-1.1.0/src/coolkey/pkcs11n.h
Examining data/coolkey-1.1.0/src/coolkey/pkcs11t.h
Examining data/coolkey-1.1.0/src/coolkey/log.cpp
Examining data/coolkey-1.1.0/src/coolkey/object.cpp
Examining data/coolkey-1.1.0/src/coolkey/object.h
Examining data/coolkey-1.1.0/src/coolkey/coolkey.cpp
Examining data/coolkey-1.1.0/src/coolkey/machdep.cpp
Examining data/coolkey-1.1.0/src/coolkey/machdep.h
Examining data/coolkey-1.1.0/src/coolkey/slot.h
Examining data/coolkey-1.1.0/src/coolkey/slot.cpp
Examining data/coolkey-1.1.0/src/install/pk11install.c
Examining data/coolkey-1.1.0/src/libckyapplet/cky_basei.h
Examining data/coolkey-1.1.0/src/libckyapplet/cky_list.h
Examining data/coolkey-1.1.0/src/libckyapplet/dynlink.c
Examining data/coolkey-1.1.0/src/libckyapplet/dynlink.h
Examining data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c
Examining data/coolkey-1.1.0/src/libckyapplet/dynlink_unix.c
Examining data/coolkey-1.1.0/src/libckyapplet/dynlink_win.c
Examining data/coolkey-1.1.0/src/libckyapplet/cky_card.h
Examining data/coolkey-1.1.0/src/libckyapplet/cky_applet.c
Examining data/coolkey-1.1.0/src/libckyapplet/cky_applet.h
Examining data/coolkey-1.1.0/src/libckyapplet/cky_base.c
Examining data/coolkey-1.1.0/src/libckyapplet/cky_base.h
Examining data/coolkey-1.1.0/src/libckyapplet/cky_factory.c
Examining data/coolkey-1.1.0/src/libckyapplet/cky_factory.h
Examining data/coolkey-1.1.0/src/libckyapplet/cky_card.c

FINAL RESULTS:

data/coolkey-1.1.0/src/coolkey/PKCS11Exception.cpp:28: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.
#define vsnprintf _vsnprintf
data/coolkey-1.1.0/src/coolkey/PKCS11Exception.cpp:52:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf, BUFSIZE, format, args);
data/coolkey-1.1.0/src/coolkey/log.cpp:49: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(file, msg, ap);
data/coolkey-1.1.0/src/coolkey/log.cpp:104:2:  [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(msg2, COOLKEY_PREFIX);
data/coolkey-1.1.0/src/coolkey/log.cpp:105:2:  [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(msg2, msg); 
data/coolkey-1.1.0/src/coolkey/machdep.cpp:343: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(&shmemData->path[sizeof(MEMSEGPATH)],name);
data/coolkey-1.1.0/src/coolkey/machdep.cpp:346:5:  [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(shmemData->path,uid_str);
data/coolkey-1.1.0/src/coolkey/slot.cpp:38:22:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINTF(args) printf args
data/coolkey-1.1.0/src/coolkey/slot.cpp:1654:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(segName,SEGMENT_PREFIX"%s",readerName); 
data/coolkey-1.1.0/src/install/pk11install.c:74:6:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     fprintf(outFile, buffer);
data/coolkey-1.1.0/src/install/pk11install.c:194:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(paramString,CONFIG_TAG"\"%s\" ",dirPath);
data/coolkey-1.1.0/src/install/pk11install.c:236:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(searchString,"%s" PINST_FS "%s",dirPath,search);
data/coolkey-1.1.0/src/install/pk11install.c:245: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(tempPath, searchString);
data/coolkey-1.1.0/src/install/pk11install.c:281:2:  [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(fileStart,path);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:58:17:  [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(result, image_name);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:95:6:  [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(libPath,parentPath);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:96:6:  [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(libPath,libname);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:108:2:  [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(libPath,SYSPATH);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:109:2:  [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(libPath,libname);
data/coolkey-1.1.0/src/coolkey/coolkey.cpp:241:26:  [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 * logFileName = getenv("COOL_KEY_LOG_FILE");
data/coolkey-1.1.0/src/coolkey/machdep.cpp:134:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(&lockData->mutex);
data/coolkey-1.1.0/src/coolkey/machdep.cpp:157:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&lockData->mutex);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3459:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer random;
data/coolkey-1.1.0/src/coolkey/slot.cpp:3465:26:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer_InitEmpty(&random);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3472:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	status = CKYApplet_GetRandom(conn, &random, len, &result);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3476:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    CKYBuffer_SetChar(&random, i, 
data/coolkey-1.1.0/src/coolkey/slot.cpp:3477:23:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			CKYBuffer_GetChar(&random,i) ^
data/coolkey-1.1.0/src/coolkey/slot.cpp:3480:39:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	status = CKYApplet_SeedRandom(conn, &random, &result);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3487:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer_FreeData(&random);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3511:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer random;
data/coolkey-1.1.0/src/coolkey/slot.cpp:3512:26:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer_InitEmpty(&random);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3519:44:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	status = CKYApplet_GetRandomAppend(conn, &random, len, &result);
data/coolkey-1.1.0/src/coolkey/slot.cpp:3524:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    CKYBuffer_FreeData(&random);
data/coolkey-1.1.0/src/install/pk11install.c:438: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.
    dirPaths[HomeDir] = getenv("HOME");
data/coolkey-1.1.0/src/libckyapplet/dynlink_win.c:29:15:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    library = LoadLibrary(libname);
data/coolkey-1.1.0/src/coolkey/PKCS11Exception.cpp:51: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[BUFSIZE];
data/coolkey-1.1.0/src/coolkey/log.cpp:36:12:  [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 = fopen(filename, "at");
data/coolkey-1.1.0/src/coolkey/log.cpp:64: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 string[ROW_LENGTH+1];
data/coolkey-1.1.0/src/coolkey/machdep.cpp:248: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 (path, flags|O_NOFOLLOW, mode);
data/coolkey-1.1.0/src/coolkey/machdep.cpp:319: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 uid_str[UID_DIGITS+2]; /* 1 for '-', 1 for null */
data/coolkey-1.1.0/src/coolkey/machdep.cpp:341: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(shmemData->path,MEMSEGPATH, sizeof(MEMSEGPATH));
data/coolkey-1.1.0/src/coolkey/machdep.cpp:345: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(uid_str, "-%u",getuid());
data/coolkey-1.1.0/src/coolkey/machdep.cpp:349:21:  [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).
    shmemData->fd = open(shmemData->path, 
data/coolkey-1.1.0/src/coolkey/object.cpp:373:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pTemplate[i].pValue, CKYBuffer_Data(iter->getValue()), 
data/coolkey-1.1.0/src/coolkey/object.cpp:418: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(label, CKYBuffer_Data(iter->getValue()), size);
data/coolkey-1.1.0/src/coolkey/object.cpp:443: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(&objClass, CKYBuffer_Data(iter->getValue()), size);
data/coolkey-1.1.0/src/coolkey/object.cpp:1011: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(string, cn.data, cn.len);
data/coolkey-1.1.0/src/coolkey/slot.cpp:139:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(newSlots, slots, sizeof(slots[0]) * numSlots);
data/coolkey-1.1.0/src/coolkey/slot.cpp:308:11:  [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.
    const char *newReadersData[MAX_READER_DELTA];
data/coolkey-1.1.0/src/coolkey/slot.cpp:330:30:  [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.
		    newReaders = new const char *[maxReaders]; 
data/coolkey-1.1.0/src/coolkey/slot.cpp:336:7:  [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(newReaders, newReadersData, 
data/coolkey-1.1.0/src/coolkey/slot.cpp:1014: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(pSlotInfo->slotDescription, readerName,
data/coolkey-1.1.0/src/coolkey/slot.cpp:1017: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(pSlotInfo->manufacturerID, manufacturer,
data/coolkey-1.1.0/src/coolkey/slot.cpp:1078:2:  [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(label, personName, MIN(personLen, maxSize));
data/coolkey-1.1.0/src/coolkey/slot.cpp:1090:2:  [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(label, COOLKEY, coolKeySize-1);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1095: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(label, COOLKEY POSSESSION, prefixSize);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1097: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(&label[prefixSize], personName, 
data/coolkey-1.1.0/src/coolkey/slot.cpp:1163:6:  [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(cp,manList[i].string, MIN(len,maxSize-5));
data/coolkey-1.1.0/src/coolkey/slot.cpp:1250:2:  [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(myReaderStates, readerStates, 
data/coolkey-1.1.0/src/coolkey/slot.cpp:1625:14:  [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.
    unsigned char  cuid[10];
data/coolkey-1.1.0/src/coolkey/slot.cpp:1817: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, CKYBuffer_Data(dataHeader), size);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1830: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, CKYBuffer_Data(objData), size);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1897: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(shmData, CKYBuffer_Data(data), size);
data/coolkey-1.1.0/src/coolkey/slot.cpp:2136: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(personName,CKYBuffer_Data(&objBuffer)+OBJ_TOKENNAME_OFFSET,
data/coolkey-1.1.0/src/coolkey/slot.cpp:3367:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pOutput, CKYBuffer_Data(result), CKYBuffer_Size(result));
data/coolkey-1.1.0/src/install/pk11install.c:63:6:  [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[256];
data/coolkey-1.1.0/src/install/pk11install.c:68:6:  [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,"Format message problem, error = %d (0x%x)\n", error, error);
data/coolkey-1.1.0/src/install/pk11install.c:132:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *dirPaths[MaxDirType] = { NULL };
data/coolkey-1.1.0/src/install/pk11install.c:316: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 appData[MAX_PATH];
data/coolkey-1.1.0/src/install/pk11install.c:317: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 netscapeInstall[MAX_PATH];
data/coolkey-1.1.0/src/install/pk11install.c:382:2:  [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 productName[255];
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:138: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(buf->data, data, buf->len);
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:166: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(buf->data, src->data+start, buf->len);
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf->data, src->data, buf->len);
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:287: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(buf->data+offset, data, len);
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:301: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(buf->data+buf->len, data, len);
data/coolkey-1.1.0/src/libckyapplet/cky_card.c:369: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(readers, *array, arraySize*sizeof(SCARD_READERSTATE));
data/coolkey-1.1.0/src/coolkey/log.cpp:102: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).
    msg2 = (char *)malloc(strlen(msg)+sizeof(COOLKEY_PREFIX));
data/coolkey-1.1.0/src/coolkey/machdep.cpp:328:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    int mask = umask(0);
data/coolkey-1.1.0/src/coolkey/machdep.cpp:330:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(mask);
data/coolkey-1.1.0/src/coolkey/machdep.cpp:336:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    shmemData->path = new char [sizeof(MEMSEGPATH)+strlen(name)+UID_DIGITS+3];
data/coolkey-1.1.0/src/coolkey/machdep.cpp:534:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(time); 
data/coolkey-1.1.0/src/coolkey/object.cpp:466: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).
    CKYBuffer_InitFromData(&buf, (const CKYByte *)string, strlen(string));
data/coolkey-1.1.0/src/coolkey/params.h:42: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).
	index += strlen(key);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1015: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).
        MIN(64, strlen(readerName)) );
data/coolkey-1.1.0/src/coolkey/slot.cpp:1018: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).
        MIN(32, strlen(manufacturer)) );
data/coolkey-1.1.0/src/coolkey/slot.cpp:1077:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	personLen = strlen(personName);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1096: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).
    personLen = strlen(personName);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1162: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).
	    int len = strlen(manList[i].string);
data/coolkey-1.1.0/src/coolkey/slot.cpp:1649: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).
   segName = new char[strlen(readerName)+sizeof(SEGMENT_PREFIX)+1];
data/coolkey-1.1.0/src/install/pk11install.c:111: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).
    int len = strlen(path);
data/coolkey-1.1.0/src/install/pk11install.c:186:40:  [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).
    char *paramString = (char *)malloc(strlen(dirPath)+sizeof(CONFIG_TAG)+3);
data/coolkey-1.1.0/src/install/pk11install.c:230:35:  [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).
    searchString = (char *)malloc(strlen(dirPath)+2+strlen(search));
data/coolkey-1.1.0/src/install/pk11install.c:230:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    searchString = (char *)malloc(strlen(dirPath)+2+strlen(search));
data/coolkey-1.1.0/src/install/pk11install.c:238: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).
    searchStringLen = strlen(searchString);
data/coolkey-1.1.0/src/libckyapplet/cky_base.c:95: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).
    int len = strlen(hexString);
data/coolkey-1.1.0/src/libckyapplet/cky_card.c:639:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (cur = readerStr, count = 0; *cur; cur += strlen(cur)+1, count++ ) 
data/coolkey-1.1.0/src/libckyapplet/cky_card.c:647: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).
    for (i=0, cur=readerStr; i < count ; cur+=strlen(cur) +1, i++) {
data/coolkey-1.1.0/src/libckyapplet/cky_factory.c:242: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(pinValue);
data/coolkey-1.1.0/src/libckyapplet/cky_factory.c:255: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(pinValue);
data/coolkey-1.1.0/src/libckyapplet/cky_factory.c:273:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    oldLen = strlen(oldPin);
data/coolkey-1.1.0/src/libckyapplet/cky_factory.c:274:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    newLen = strlen(newPin);
data/coolkey-1.1.0/src/libckyapplet/cky_factory.c:652: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).
    size = strlen(pin);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:55:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            result = malloc(strlen(image_name)+1);
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:81: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).
	int pLen = strlen(parentPath)+1;
data/coolkey-1.1.0/src/libckyapplet/dynlink_mac.c:88:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    libPath = malloc(len+strlen(libname)+1);

ANALYSIS SUMMARY:

Hits = 106
Lines analyzed = 16236 in approximately 0.63 seconds (25937 lines/second)
Physical Source Lines of Code (SLOC) = 11318
Hits@level = [0]   6 [1]  29 [2]  42 [3]  16 [4]  19 [5]   0
Hits@level+ = [0+] 112 [1+] 106 [2+]  77 [3+]  35 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 9.89574 [1+] 9.36561 [2+] 6.80332 [3+] 3.09242 [4+] 1.67874 [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.