From e081bb54e0eecfb962e7f0cfd84fcbdb2683d54d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 31 Jan 2005 08:35:51 +0000 Subject: [PATCH] Avoid a buffer overflow with threads and PERLIO_DEBUG p4raw-id: //depot/perl@23904 --- perlio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perlio.c b/perlio.c index 19b842e..85bc755 100644 --- a/perlio.c +++ b/perlio.c @@ -472,7 +472,7 @@ PerlIO_debug(const char *fmt, ...) s = CopFILE(PL_curcop); if (!s) s = "(none)"; - sprintf(buffer, "%s:%" IVdf " ", s, (IV) CopLINE(PL_curcop)); + sprintf(buffer, "%.40s:%" IVdf " ", s, (IV) CopLINE(PL_curcop)); len = strlen(buffer); vsprintf(buffer+len, fmt, ap); PerlLIO_write(dbg, buffer, strlen(buffer)); -- 2.7.4