Actions
Bug #6985
closedbase64: coverity dead code warning
Affected Versions:
Effort:
Difficulty:
Label:
Description
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1596621: Control flow issues (DEADCODE)
/src/util-base64.c: 238 in DecodeBase64RFC4648()
________________________________________________________________________________________________________
*** CID 1596621: Control flow issues (DEADCODE)
/src/util-base64.c: 238 in DecodeBase64RFC4648()
232 DEBUG_VALIDATE_BUG_ON(bbidx == B64_BLOCK);
233
234 /* Handle any leftover bytes by adding padding to them as long as they do not
235 * violate the destination buffer size */
236 if (bbidx > 0) {
237 padding = bbidx > 1 ? B64_BLOCK - bbidx : 2;
>>> CID 1596621: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "3U" inside this statement: "numDecoded_blk = 3U - ((pad...".
238 uint32_t numDecoded_blk = ASCII_BLOCK - (padding < B64_BLOCK ? padding : ASCII_BLOCK);
239 if (dest_size < *decoded_bytes + numDecoded_blk) {
240 SCLogDebug("Destination buffer full");
241 return BASE64_ECODE_BUF;
242 }
243 /* Decode base-64 block into ascii block and move pointer */
Updated by Shivani Bhardwaj 7 months ago
- Status changed from Assigned to In Review
In Review PR: https://github.com/OISF/suricata/pull/10957
Updated by Victor Julien 7 months ago
- Status changed from In Review to Closed
https://github.com/OISF/suricata/pull/10983
Confirmed that issue is considered fixed by Coverity.
Actions