mirror of
https://git.zap.org.au/git/trader.git
synced 2024-11-03 17:27:29 -05:00
Keep Coverity Scan happy
Coverity Scan (https://scan.coverity.com/projects/trader) complains that a high-impact defect is present in the scramble() function: "String not null terminated" -- even though b64encode() does give a NUL-termininated buffer.
This commit is contained in:
parent
e3d5d04774
commit
30bfcd167a
@ -929,6 +929,7 @@ char *scramble (char *restrict dest, const char *restrict src,
|
||||
// Place checksum in front of Base64 string
|
||||
snprintf(chksumbuf, SCRAMBLE_CHKSUM_LEN + 1, "%03x", chksum);
|
||||
memcpy(dest, chksumbuf, SCRAMBLE_CHKSUM_LEN);
|
||||
dest[size - 1] = '\0'; // Keep Coverity Scan happy...
|
||||
|
||||
free(xorbuf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user