summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-02-03 21:42:36 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2016-02-07 08:23:46 -0500
commitd2f5c618aba7b5510e895c4b2e3bc6140ae8f133 (patch)
tree86fcec48fc8ebc30e3d9259302df809f00070500 /ext
parented6087adbd9c90b59cf3f08af7c23a947c00bf69 (diff)
downloadperl-d2f5c618aba7b5510e895c4b2e3bc6140ae8f133.tar.gz
XS-APItest: Length cannot be negative.
Coverity CID 135019: Argument cannot be negative (NEGATIVE_RETURNS)
Diffstat (limited to 'ext')
-rw-r--r--ext/XS-APItest/APItest.xs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index d7376ba21e..bbd00c7db1 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -5490,6 +5490,7 @@ test_Gconvert(SV * number, SV * num_digits)
CODE:
len = (int) SvIV(num_digits);
if (len > 99) croak("Too long a number for test_Gconvert");
+ if (len < 0) croak("Too short a number for test_Gconvert");
PERL_UNUSED_RESULT(Gconvert(SvNV(number), len,
0, /* No trailing zeroes */
buffer));