diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-04-29 23:35:52 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-29 23:35:52 +0000 |
commit | 6a841143011641ad36ad4f8e2f2896eb0e1a59dc (patch) | |
tree | 0b01325f2d6b4ef018f9959f5d352ba3314cf4e9 /perlio.c | |
parent | c9cb0f4189a96c284198e261ba3e6a7df9d31f55 (diff) | |
download | perl-6a841143011641ad36ad4f8e2f2896eb0e1a59dc.tar.gz |
Coverity disliked us passing a negative length to vsnprintf().
p4raw-id: //depot/perl@28020
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5143,7 +5143,7 @@ PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap) { dVAR; #ifdef USE_VSNPRINTF - const int val = vsnprintf(s, n, fmt, ap); + const int val = vsnprintf(s, n > 0 ? n : 0, fmt, ap); #else const int val = vsprintf(s, fmt, ap); #endif /* #ifdef USE_VSNPRINTF */ |