cvs: php4 /ext/standard formatted_print.c

From: Date: Mon, 14 Aug 2000 15:54:57 +0000
Subject: cvs: php4 /ext/standard formatted_print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1173@lists.php.net to get a copy of this message
stas Mon Aug 14 08:54:57 2000 EDT Modified files: /php4/ext/standard formatted_print.c Log: Fix print length - again # I hope _this_ is the right fix... Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.25 php4/ext/standard/formatted_print.c:1.26 --- php4/ext/standard/formatted_print.c:1.25 Mon Aug 14 04:07:28 2000 +++ php4/ext/standard/formatted_print.c Mon Aug 14 08:54:57 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.25 2000/08/14 11:07:28 stas Exp $ */ +/* $Id: formatted_print.c,v 1.26 2000/08/14 15:54:57 stas Exp $ */ #include <math.h> /* modf() */ #include "php.h" @@ -184,7 +184,7 @@ } } PRINTF_DEBUG(("sprintf: appending \"%s\"\n", add)); - strncpy(&(*buffer)[*pos], add, max_width-*pos+1); + strncpy(&(*buffer)[*pos], add, MIN(max_width, len)+1); *pos += MIN(max_width, len); if (alignment == ALIGN_LEFT) { while (npad--) {

« previous php.cvs (#1173) next »