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/librelp-1.9.0/src/sendbuf.c
Examining data/librelp-1.9.0/src/tcp.h
Examining data/librelp-1.9.0/src/sendq.c
Examining data/librelp-1.9.0/src/sendq.h
Examining data/librelp-1.9.0/src/relpsrv.h
Examining data/librelp-1.9.0/src/relpclt.c
Examining data/librelp-1.9.0/src/offers.h
Examining data/librelp-1.9.0/src/sendbuf.h
Examining data/librelp-1.9.0/src/relpsrv.c
Examining data/librelp-1.9.0/src/relp.h
Examining data/librelp-1.9.0/src/offers.c
Examining data/librelp-1.9.0/src/scsyslog.c
Examining data/librelp-1.9.0/src/cclose.c
Examining data/librelp-1.9.0/src/relp.c
Examining data/librelp-1.9.0/src/relpclt.h
Examining data/librelp-1.9.0/src/compat/strndup.c
Examining data/librelp-1.9.0/src/relpframe.c
Examining data/librelp-1.9.0/src/copen.c
Examining data/librelp-1.9.0/src/scrsp.c
Examining data/librelp-1.9.0/src/dbllinklist.h
Examining data/librelp-1.9.0/src/cserverclose.c
Examining data/librelp-1.9.0/src/tcp.c
Examining data/librelp-1.9.0/src/relpsess.h
Examining data/librelp-1.9.0/src/librelp.h
Examining data/librelp-1.9.0/src/relpsess.c
Examining data/librelp-1.9.0/src/cmdif.h
Examining data/librelp-1.9.0/src/relpframe.h
Examining data/librelp-1.9.0/tests/chkseq.c
Examining data/librelp-1.9.0/tests/have_tlslib.c
Examining data/librelp-1.9.0/tests/receive.c
Examining data/librelp-1.9.0/tests/send.c

FINAL RESULTS:

data/librelp-1.9.0/src/librelp.h:199:55:  [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.
	void (*dbgprint)(char *fmt, ...) LIBRELP_ATTR_FORMAT(printf, 1, 2));
data/librelp-1.9.0/src/offers.c:336:3:  [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((char*)pszOffers+iStr, (char*)pOffer->szName);
data/librelp-1.9.0/src/offers.c:347:4:  [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((char*)pszOffers+iStr, (char*)pOfferVal->szVal);
data/librelp-1.9.0/src/relp.c:54:26:  [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.
void LIBRELP_ATTR_FORMAT(printf, 4, 5)
data/librelp-1.9.0/src/relp.c:61:2:  [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(emsg, sizeof(emsg), fmt, ap);
data/librelp-1.9.0/src/relp.c:329:103:  [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.
relpEngineSetDbgprint(relpEngine_t *const pThis, void (*dbgprint)(char *fmt, ...) LIBRELP_ATTR_FORMAT(printf, 1, 2))
data/librelp-1.9.0/src/relp.h:128:55:  [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.
	void (*dbgprint)(char *fmt, ...) LIBRELP_ATTR_FORMAT(printf, 1, 2);
data/librelp-1.9.0/src/relp.h:234:26:  [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.
void LIBRELP_ATTR_FORMAT(printf, 4, 5) relpEngineCallOnGenericErr(relpEngine_t *pThis,
data/librelp-1.9.0/src/tcp.c:940:4:  [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((char*)szHname, (char*)szIP);
data/librelp-1.9.0/src/tcp.c:943:3:  [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((char*)szHname, (char*)szIP);
data/librelp-1.9.0/tests/chkseq.c:133:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
				scanfOK = sscanf(ioBuf, "%d,%d,%s\n", &val, &edLen, edBuf) == 3 ? 1 : 0;
data/librelp-1.9.0/tests/chkseq.c:197:17:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
						scanfOK = sscanf(ioBuf, "%d,%d,%s\n", &val,
data/librelp-1.9.0/tests/receive.c:115:33:  [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.
static void LIBRELP_ATTR_FORMAT(printf, 1, 2)
data/librelp-1.9.0/tests/receive.c:122:2:  [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(pszWriteBuf, sizeof(pszWriteBuf), fmt, ap);
data/librelp-1.9.0/tests/send.c:74:33:  [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.
static void LIBRELP_ATTR_FORMAT(printf, 1, 2)
data/librelp-1.9.0/tests/send.c:81:2:  [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(pszWriteBuf, sizeof(pszWriteBuf), fmt, ap);
data/librelp-1.9.0/tests/send.c:213:3:  [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(msgData, pMsg);
data/librelp-1.9.0/tests/chkseq.c:72:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while((opt = getopt(argc, argv, "i:e:f:ds:vm:ET")) != EOF) {
data/librelp-1.9.0/tests/receive.c:261:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while((c = getopt_long(argc, argv, "a:c:Ae:F:l:m:o:O:P:p:TvW:x:y:z:",
data/librelp-1.9.0/tests/send.c:255:13:  [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.
	under_ci = getenv("UNDER_CI");
data/librelp-1.9.0/tests/send.c:283:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while((c = getopt_long(argc, argv, "a:c:e:d:l:m:n:P:p:Tt:vx:y:z:", long_options, &option_index)) != -1) {
data/librelp-1.9.0/src/compat/strndup.c:40: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(new_s, s, n);
data/librelp-1.9.0/src/copen.c:137:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szErrMsg[80];
data/librelp-1.9.0/src/offers.c:323:3:  [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*)pszOffers, (char*)pszHdr, lenHdr);
data/librelp-1.9.0/src/offers.c:381: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.
	unsigned char szFeatNam[RELP_MAX_OFFER_FEATURENAME+1];
data/librelp-1.9.0/src/offers.c:382: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.
	unsigned char szFeatVal[RELP_MAX_OFFER_FEATUREVALUE+1];
data/librelp-1.9.0/src/offers.h:49: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.
	unsigned char szVal[RELP_MAX_OFFER_FEATUREVALUE+1];
data/librelp-1.9.0/src/offers.h:62: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.
	unsigned char szName[RELP_MAX_OFFER_FEATURENAME+1];
data/librelp-1.9.0/src/relp.c:58:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char emsg[1024];
data/librelp-1.9.0/src/relp.c:110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char errStr[1024];
data/librelp-1.9.0/src/relp.c:135:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char errStr[1024];
data/librelp-1.9.0/src/relp.c:693:4:  [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 errStr[1024];
data/librelp-1.9.0/src/relpframe.c:291:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bufTxnr[16];
data/librelp-1.9.0/src/relpframe.c:310: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(ptrMembuf, bufTxnr, lenTxnr);
data/librelp-1.9.0/src/relpframe.c:336:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bufTxnr[16];
data/librelp-1.9.0/src/relpframe.c:338:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bufDatalen[16];
data/librelp-1.9.0/src/relpframe.c:375: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(ptrMembuf, bufTxnr, lenTxnr); ptrMembuf += lenTxnr;
data/librelp-1.9.0/src/relpframe.c:377: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(ptrMembuf, pCmd, lenCmd); ptrMembuf += lenCmd;
data/librelp-1.9.0/src/relpframe.c:379: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(ptrMembuf, bufDatalen, lenDatalen); ptrMembuf += lenDatalen;
data/librelp-1.9.0/src/relpframe.c:383:3:  [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(ptrMembuf, pData, lenData); ptrMembuf += lenData;
data/librelp-1.9.0/src/relpsess.c:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char objinfo[1024];
data/librelp-1.9.0/src/relpsess.c:572: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(&tTimeout, &tCurr, sizeof(struct timespec));
data/librelp-1.9.0/src/scrsp.c:102: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.
	unsigned char bufText[81]; /* max 80 chars as of RELP spec! */
data/librelp-1.9.0/src/tcp.c:106:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char objinfo[1024];
data/librelp-1.9.0/src/tcp.c:376:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char psz[256];
data/librelp-1.9.0/src/tcp.c:377:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[512];
data/librelp-1.9.0/src/tcp.c:378:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errmsg[1024];
data/librelp-1.9.0/src/tcp.c:425:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(fpBuf+iDst, ":%2.2X", (unsigned char) pFingerprint[iSrc]);
data/librelp-1.9.0/src/tcp.c:439: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.
	unsigned char fingerprint[20 /*EVP_MAX_MD_SIZE*/];
data/librelp-1.9.0/src/tcp.c:440:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fpPrintable[256];
data/librelp-1.9.0/src/tcp.c:491:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char allNames[32*1024]; /* work buffer */
data/librelp-1.9.0/src/tcp.c:579:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szdbgdata1[256];
data/librelp-1.9.0/src/tcp.c:580:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szdbgdata2[256];
data/librelp-1.9.0/src/tcp.c:581:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szdberrmsg[1024];
data/librelp-1.9.0/src/tcp.c:830:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char msgbuf[4096];
data/librelp-1.9.0/src/tcp.c:903: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.
	unsigned char szIP[NI_MAXHOST] = "";
data/librelp-1.9.0/src/tcp.c:904: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.
	unsigned char szHname[NI_MAXHOST+64] = ""; /* 64 extra bytes for message text */
data/librelp-1.9.0/src/tcp.c:916:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy((char*)szHname, "???");
data/librelp-1.9.0/src/tcp.c:917:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy((char*)szIP, "???");
data/librelp-1.9.0/src/tcp.c:953: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(pThis->pRemHostIP, szIP, len);
data/librelp-1.9.0/src/tcp.c:961: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(pThis->pRemHostName, szHname, len);
data/librelp-1.9.0/src/tcp.c:1158:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pristringBuf[4096];
data/librelp-1.9.0/src/tcp.c:1210:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pristringBuf[4096];
data/librelp-1.9.0/src/tcp.c:1472:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szDbg[255];
data/librelp-1.9.0/src/tcp.c:1550:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errmsg[1024];
data/librelp-1.9.0/src/tcp.c:1632:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char errmsg[1424];
data/librelp-1.9.0/src/tcp.c:2071:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char errStr[1024];
data/librelp-1.9.0/src/tcp.c:2387:4:  [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(fpBuf+iDst, ":%2.2X", (unsigned char) pFingerprint[iSrc]);
data/librelp-1.9.0/src/tcp.c:2407:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char digest[32];
data/librelp-1.9.0/src/tcp.c:2454:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fingerprint[126];
data/librelp-1.9.0/src/tcp.c:2455:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fpPrintable[256];
data/librelp-1.9.0/src/tcp.c:2513:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szDN[1024]; /* this should really be large enough for any non-malicious case... */
data/librelp-1.9.0/src/tcp.c:2533:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cnBuf[1024]; /* this is sufficient for the DNSNAME... */
data/librelp-1.9.0/src/tcp.c:2534:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char szAltName[1024]; /* this is sufficient for the DNSNAME... */
data/librelp-1.9.0/src/tcp.c:2536:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char allNames[32*1024]; /* for error-reporting */
data/librelp-1.9.0/src/tcp.c:2965:4:  [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 msgbuf[4096];
data/librelp-1.9.0/src/tcp.c:3295: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 msgbuf[900];
data/librelp-1.9.0/src/tcp.c:3296: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 errStr[800];
data/librelp-1.9.0/src/tcp.c:3560:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errmsg[1424];
data/librelp-1.9.0/src/tcp.c:3600:4:  [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 errStr[1200];
data/librelp-1.9.0/tests/chkseq.c:68: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.
	static char edBuf[500*1024]; /* buffer for extra data (pretty large to be on the save side...) */
data/librelp-1.9.0/tests/chkseq.c:69: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.
	static char ioBuf[sizeof(edBuf)+1024];
data/librelp-1.9.0/tests/chkseq.c:81:16:  [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).
			increment = atoi(optarg);
data/librelp-1.9.0/tests/chkseq.c:84:10:  [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).
			end = atoi(optarg);
data/librelp-1.9.0/tests/chkseq.c:87:12:  [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).
			start = atoi(optarg);
data/librelp-1.9.0/tests/chkseq.c:93: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).
			lostok = atoi(optarg);
data/librelp-1.9.0/tests/chkseq.c:120:8:  [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).
		fp = fopen(file, "r");
data/librelp-1.9.0/tests/receive.c:119:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pszWriteBuf[32*1024+1];
data/librelp-1.9.0/tests/receive.c:137: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(pMsg, msg, lenMsg);
data/librelp-1.9.0/tests/receive.c:274: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).
			if((errFile = fopen((char*) optarg, "w")) == NULL) {
data/librelp-1.9.0/tests/receive.c:290:18:  [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).
			maxDataSize = atoi(optarg);
data/librelp-1.9.0/tests/receive.c:324:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			watchdog_timeout = atoi(optarg);
data/librelp-1.9.0/tests/receive.c:399:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if((outFile = fopen(outfile_name, append_outfile ? "a" : "w")) == NULL) {
data/librelp-1.9.0/tests/receive.c:456: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).
		if((fp = fopen((char*) pidFileName, "w")) == NULL) {
data/librelp-1.9.0/tests/send.c:78:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pszWriteBuf[32*1024+1];
data/librelp-1.9.0/tests/send.c:175:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[10];
data/librelp-1.9.0/tests/send.c:292: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).
			if((errFile = fopen(optarg, "w")) == NULL) {
data/librelp-1.9.0/tests/send.c:299: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).
			if((dbgFile = fopen(optarg, "w")) == NULL) {
data/librelp-1.9.0/tests/send.c:306:10:  [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).
			len = atoi(optarg);
data/librelp-1.9.0/tests/send.c:326: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).
			num_messages = atoi(optarg);
data/librelp-1.9.0/tests/send.c:353:18:  [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).
			kill_on_msg = atoi(optarg);
data/librelp-1.9.0/tests/send.c:356:18:  [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).
			kill_signal = atoi(optarg);
data/librelp-1.9.0/tests/send.c:359:15:  [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).
			kill_pid = atoi(optarg);
data/librelp-1.9.0/tests/send.c:362:22:  [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).
			connect_retries = atoi(optarg);
data/librelp-1.9.0/src/compat/strndup.c:33:21:  [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).
	const size_t len = strlen(s);
data/librelp-1.9.0/src/copen.c:172:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(szErrMsg, "500 required command not supported by client", sizeof(szErrMsg));
data/librelp-1.9.0/src/offers.c:221:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char*)pThis->szVal, (char*)pszVal, sizeof(pThis->szVal));
data/librelp-1.9.0/src/offers.c:266:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char*)pThis->szName, (char*)pszName, sizeof(pThis->szName));
data/librelp-1.9.0/src/offers.c:329:28:  [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(currSize - iStr - 3 < strlen((char*)pOffer->szName)) {
data/librelp-1.9.0/src/offers.c:337: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).
		iStr += strlen((char*)pOffer->szName);
data/librelp-1.9.0/src/offers.c:340: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).
			if(currSize - iStr - 3 < strlen((char*)pOfferVal->szVal)) {
data/librelp-1.9.0/src/offers.c:348: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).
			iStr += strlen((char*)pOfferVal->szVal);
data/librelp-1.9.0/src/relp.c:77:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, p, buflen);
data/librelp-1.9.0/src/relp.c:84:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, p, buflen);
data/librelp-1.9.0/src/tcp.c:421:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(fpBuf,"SHA1", bufLen);
data/librelp-1.9.0/src/tcp.c:950:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen((char*)szIP) + 1; /* +1 for \0 byte */
data/librelp-1.9.0/src/tcp.c:955:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen((char*)szHname) + 1; /* +1 for \0 byte */
data/librelp-1.9.0/src/tcp.c:1165:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
				strncpy(pristringBuf, "NORMAL:+ANON-DH:+COMP-ALL", sizeof(pristringBuf));
data/librelp-1.9.0/src/tcp.c:1167:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
				strncpy(pristringBuf, "NORMAL:+ANON-DH:+COMP-NULL", sizeof(pristringBuf));
data/librelp-1.9.0/src/tcp.c:1174:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(pristringBuf, "to recommended system default", sizeof(pristringBuf));
data/librelp-1.9.0/src/tcp.c:1219:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(pristringBuf, "ALL:+COMPLEMENTOFDEFAULT:+ADH:+ECDH:+aNULL@SECLEVEL=0",
data/librelp-1.9.0/src/tcp.c:1222:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(pristringBuf, "ALL:+COMPLEMENTOFDEFAULT:+ADH:+ECDH:+aNULL",
data/librelp-1.9.0/src/tcp.c:1226:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(pristringBuf, "DEFAULT", sizeof(pristringBuf));
data/librelp-1.9.0/src/tcp.c:1642:30:  [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 (pCurrentPos != NULL && strlen(pCurrentPos) > 0) {
data/librelp-1.9.0/src/tcp.c:2379: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).
	sizeDigest=strlen(digestType);
data/librelp-1.9.0/src/tcp.c:2384:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(fpBuf,digestType,sizeDigest);
data/librelp-1.9.0/src/tcp.c:2423:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(digest,listPeers->peer[i].name,sizeDigest);
data/librelp-1.9.0/src/tcp.c:2803:34:  [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).
	pNew->lenDomainPart = (int16_t) strlen((char*)pNew->pszDomainPart);
data/librelp-1.9.0/tests/chkseq.c:135: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).
			if(edLen != (int) strlen(edBuf)) {
data/librelp-1.9.0/tests/chkseq.c:137:24:  [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 (edLen < (int) strlen(edBuf)) {
data/librelp-1.9.0/tests/chkseq.c:141: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).
							edLen, (long) strlen(edBuf), i);
data/librelp-1.9.0/tests/chkseq.c:146:24:  [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).
						   edLen, (long) strlen(edBuf), i);
data/librelp-1.9.0/tests/chkseq.c:182:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int c = getc(fp);
data/librelp-1.9.0/tests/chkseq.c:200:24:  [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(edLen != (int) strlen(edBuf)) {
data/librelp-1.9.0/tests/chkseq.c:202: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).
							if (edLen < (int) strlen(edBuf)) {
data/librelp-1.9.0/tests/chkseq.c:207:24:  [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).
									edLen, (long) strlen(edBuf), i);
data/librelp-1.9.0/tests/chkseq.c:213: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).
								edLen, (long) strlen(edBuf), i);
data/librelp-1.9.0/tests/chkseq.c:242:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		for(c = fgetc(fp) ; c != '\n' && c != EOF ; c = fgetc(fp))
data/librelp-1.9.0/tests/chkseq.c:242:51:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		for(c = fgetc(fp) ; c != '\n' && c != EOF ; c = fgetc(fp))
data/librelp-1.9.0/tests/send.c:323: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).
			lenMsg = strlen(pMsg);

ANALYSIS SUMMARY:

Hits = 140
Lines analyzed = 11711 in approximately 0.70 seconds (16702 lines/second)
Physical Source Lines of Code (SLOC) = 8048
Hits@level = [0] 115 [1]  36 [2]  83 [3]   4 [4]  17 [5]   0
Hits@level+ = [0+] 255 [1+] 140 [2+] 104 [3+]  21 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 31.6849 [1+] 17.3956 [2+] 12.9225 [3+] 2.60934 [4+] 2.11233 [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.