From: "Christoph Egger" Subject: [PATCH][XEN] fix string length check Date: Tue, 27 Nov 2007 11:27:10 +0100 Message-ID: <200711271127.10645.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_+D/SHanQmPL4cx9" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_+D/SHanQmPL4cx9 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch passes correct length to vsnprintf(). Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_+D/SHanQmPL4cx9 Content-Type: text/plain; charset=us-ascii; name=xen_console.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_console.diff diff -r 26e766e0c628 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Mon Nov 26 22:28:48 2007 +0000 +++ b/xen/drivers/char/console.c Tue Nov 27 13:29:03 2007 +0100 @@ -835,7 +835,7 @@ void debugtrace_printk(const char *fmt, snprintf(buf, sizeof(buf), "%u ", ++count); va_start(args, fmt); - (void)vsnprintf(buf + strlen(buf), sizeof(buf), fmt, args); + (void)vsnprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), fmt, args); va_end(args); if ( debugtrace_send_to_console ) --Boundary-00=_+D/SHanQmPL4cx9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_+D/SHanQmPL4cx9--