summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-04-05 16:15:41 +0000
committerSteve Peters <steve@fisharerojo.org>2006-04-05 16:15:41 +0000
commit2c1c1caaefc9a6157e7d86987f121276e2115620 (patch)
tree202f6e309383b7b17681ae793e1d4e9a685e196b /util.c
parenteae70eaa9553fc7b3ffcbb570627b8b9ae6ab9f4 (diff)
downloadperl-2c1c1caaefc9a6157e7d86987f121276e2115620.tar.gz
Try not to use negative values when accessing arrays in C. Yet another
Coverity catch. p4raw-id: //depot/perl@27724
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 9239070870..b4ed7f27ad 100644
--- 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)