projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eae70ea
)
Try not to use negative values when accessing arrays in C. Yet another
author
Steve Peters
<steve@fisharerojo.org>
Wed, 5 Apr 2006 16:15:41 +0000
(16:15 +0000)
committer
Steve Peters
<steve@fisharerojo.org>
Wed, 5 Apr 2006 16:15:41 +0000
(16:15 +0000)
Coverity catch.
p4raw-id: //depot/perl@27724
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index
9239070
..
b4ed7f2
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-3419,6
+3419,7
@@
Perl_report_evil_fh(pTHX_ const GV *gv, const IO *io, I32 op)
const char * const func =
op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */
op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */
+ op < 0 ? "" : /* handle phoney cases */
PL_op_desc[op];
const char * const pars = OP_IS_FILETEST(op) ? "" : "()";
const char * const type = OP_IS_SOCKET(op)