Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 117011
Status: resolved
Priority: 0/
Queue: Encode

Owner: Nobody in particular
Requestors: JHI [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Coverity finding 152144
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-21016-1471390447-518.0-0-0 [...]>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 711
Download (untitled) / with headers
text/plain 711b
Hi, I did a new Coverity run on bleadperl, and it picked up the below from Encode. Basically it is saying that the code is checking the s for NULL (line 378) but then later (line 382) happily dereferencing the s. Maybe the code should just give up if s is NULL? 378 dlen = (s && e && s < e) ? e-s+1 : 1; 10. Condition dst->sv_flags & 268435456, taking true branch 379 d = (U8 *) SvGROW(dst, dlen); 380 11. Condition s < e, taking true branch 381 while (s < e) { CID 152144 (#1 of 1): Dereference after null check (FORWARD_NULL) 12. var_deref_op: Dereferencing null pointer s. 382 if (UTF8_IS_INVARIANT(*s)) { 383 *d++ = *s++; 384 continue; 385 }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to