projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c9cb0f4
)
Coverity disliked us passing a negative length to vsnprintf().
Nicholas Clark [Sat, 29 Apr 2006 23:35:52 +0000 (23:35 +0000)]
p4raw-id: //depot/perl@28020
perlio.c
patch
|
blob
|
blame
|
history
diff --git
a/perlio.c
b/perlio.c
index
8d8a4ec
..
24f419f
100644
(file)
--- a/
perlio.c
+++ b/
perlio.c
@@
-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 */