From c281c6e06a1c9ff65e5ea00d172ea42806fb677f Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Thu, 7 Dec 2017 10:57:06 +0100 Subject: Typo in xserver Xvasprintf() Backported from X.org: commit 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 Author: Colin Harrison Date: Fri Dec 10 00:08:24 2010 +0000 Typo in xserver Xvasprintf() I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW for Windows build) to correct various crashes. Reviewed-by: Alan Coopersmith Backported-to-NX-by: Mihai Moldovan --- nx-X11/programs/Xserver/os/xprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/os/xprintf.c b/nx-X11/programs/Xserver/os/xprintf.c index de56de0d1..58e0d507d 100644 --- a/nx-X11/programs/Xserver/os/xprintf.c +++ b/nx-X11/programs/Xserver/os/xprintf.c @@ -128,7 +128,7 @@ Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va) } else { - ret[r] = 0; + (*ret)[r] = 0; return r; } } @@ -164,7 +164,7 @@ Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va) return -1; vsnprintf(*ret, size + 1, format, va); - ret[size] = 0; + (*ret)[size] = 0; return size; #endif } -- cgit v1.2.3