summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-09 13:18:34 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-09 13:18:34 +0000
commitcdc3231cb53dfb75cf0b9268f10ccda7f6b8d10d (patch)
tree96e265acc37e85b5ffa2a6196d39536753d92bc5 /op.c
parent735fec840d57c71a7d7fbdc8ecb199c92bb3f870 (diff)
downloadperl-cdc3231cb53dfb75cf0b9268f10ccda7f6b8d10d.tar.gz
Fix another Coverity problem by adding an assert that says that
some string we got from the lexer is null-terminated p4raw-id: //depot/perl@28137
Diffstat (limited to 'op.c')
-rw-r--r--op.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/op.c b/op.c
index a866fcbf08..30231d3830 100644
--- a/op.c
+++ b/op.c
@@ -248,6 +248,7 @@ Perl_allocmy(pTHX_ char *name)
/* 1999-02-27 mjd@plover.com */
char *p;
p = strchr(name, '\0');
+ assert(p);
/* The next block assumes the buffer is at least 205 chars
long. At present, it's always at least 256 chars. */
if (p - name > 200) {