summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-25 21:23:39 +0300
committerSteve Peters <steve@fisharerojo.org>2006-04-28 02:12:03 +0000
commite80fed9da44c731a6f85b5544b737325bd9a41a7 (patch)
treeed45b5a4741d1cebf6930d3baf33fb3c0d808797 /toke.c
parent658aef798ab992aed2b708fed0d12323ab3b1fcb (diff)
downloadperl-e80fed9da44c731a6f85b5544b737325bd9a41a7.tar.gz
Re: [PATCH] use snprintf/strlcpy/strlcat when useful
Message-ID: <444E3EFB.8020503@gmail.com> p4raw-id: //depot/perl@27987
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index fc997ad364..562a36c3d1 100644
--- a/toke.c
+++ b/toke.c
@@ -5975,7 +5975,11 @@ Perl_yylex(pTHX)
if (!PL_in_my_stash) {
char tmpbuf[1024];
PL_bufptr = s;
+#ifdef USE_SNPRINTF
+ snprintf(tmpbuf, sizeof(tmpbuf), "No such class %.1000s", PL_tokenbuf);
+#else
sprintf(tmpbuf, "No such class %.1000s", PL_tokenbuf);
+#endif /* #ifdef USE_SNPRINTF */
yyerror(tmpbuf);
}
#ifdef PERL_MAD