summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2017-11-29 08:22:29 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2017-11-29 11:03:48 +0200
commit4be3e658104061aa3657d48e859204193abd5030 (patch)
tree38586c9a144fbe9a6c4a68fe598fb8eadc0d6891 /sv.c
parentb123425910491a792e15d8d4105aa2a31e48bdd3 (diff)
downloadperl-4be3e658104061aa3657d48e859204193abd5030.tar.gz
assert() that the vlnz is not NULL before using it.
Coverity #169272.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 225a743d14..a5bc1e302b 100644
--- a/sv.c
+++ b/sv.c
@@ -11711,6 +11711,7 @@ S_format_hexfp(pTHX_ char * const buf, const STRLEN bufsize, const char c,
* the top non-zero nybble. */
for (i = vfnz[0], n = 0; i > 1; i >>= 1, n++) { }
assert(n < 4);
+ assert(vlnz);
vlnz[1] = 0;
for (vshr = vlnz; vshr >= vfnz; vshr--) {
vshr[1] |= (vshr[0] & (0xF >> (4 - n))) << (4 - n);