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/tclcurl-7.22.0+hg20160822/generic/multi.c
Examining data/tclcurl-7.22.0+hg20160822/generic/multi.h
Examining data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c
Examining data/tclcurl-7.22.0+hg20160822/generic/tclcurl.h

FINAL RESULTS:

data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3566:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tclversion,"TclCurl Version %s (%s)",TclCurlVersion,
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4163: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(tmpPtr,old);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4282:72:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
curlShareLockFunc (CURL *handle, curl_lock_data data, curl_lock_access access
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.h:504:32:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            , curl_lock_access access, void *userptr);
data/tclcurl-7.22.0+hg20160822/generic/multi.c:66:9:  [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(handleName,"mcurl%d",i);
data/tclcurl-7.22.0+hg20160822/generic/multi.c:716: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           errorMsg[500];
data/tclcurl-7.22.0+hg20160822/generic/multi.c:887: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                       tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:92:9:  [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(handleName,"curl%d",i);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:390: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        errorMsg[500];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:766:33:  [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((char *)formArray[formArrayIndex].value,tmpStr,curlformBufferSize);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:766:41:  [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.
                                memcpy((char *)formArray[formArrayIndex].value,tmpStr,curlformBufferSize);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:768:41:  [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.
                                memset((char *)formArray[formArrayIndex].value,0,1);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:812:33:  [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(Tcl_Alloc(curlformBufferSize), tmpUStr, curlformBufferSize);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2411: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        errorMsg[500];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2524: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(&(mem->memory[mem->size]), ptr, realsize);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2558: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                   tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2641: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                 tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2659: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(ptr,readBytes,sizeRead);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2683: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                            tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2791: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                     tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2829: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                     tclCommand[500];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2991: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                tclCommand[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3335:13:  [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(charPtr,"%d",certinfoPtr->num_of_certs);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3564: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        tclversion[200];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3682: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                           tmp[7];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3702:13:  [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(tmp,"%X",infoPtr->version_num);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3813: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(curlDataNew, curlDataOld, sizeof(struct curlObjData));
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3864: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(curlDataNew->bodyVar.memory,curlDataOld->bodyVar.memory
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3972: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            errorMsg[300];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3979:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            *handle=fopen(fileName,"w");
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3981:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            *handle=fopen(fileName,"wb");
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3985:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            *handle=fopen(fileName,"r");
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:3987:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            *handle=fopen(fileName,"rb");
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4107:27:  [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.
                Tcl_Free((char *)(formArray[i].value));
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4195:9:  [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(shandleName,"scurl%d",i);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4446: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                   errorMsg[500];
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:666:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(curlData->errorBufferName,startPtr,charLength);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:671:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(curlData->errorBufferKey,startPtr,charLength);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2460:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(headerName,startPtr,charLength);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2466:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(headerContent,startPtr,charLength);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:2485:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(httpStatus,startPtr,charLength);
data/tclcurl-7.22.0+hg20160822/generic/tclcurl.c:4162: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).
    tmpPtr=Tcl_Alloc(strlen(old)+1);

ANALYSIS SUMMARY:

Hits = 42
Lines analyzed = 6104 in approximately 0.19 seconds (32836 lines/second)
Physical Source Lines of Code (SLOC) = 4264
Hits@level = [0]  13 [1]   6 [2]  32 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  55 [1+]  42 [2+]  36 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 12.8987 [1+] 9.84991 [2+] 8.44278 [3+] 0.938086 [4+] 0.938086 [5+]   0
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.