From 7a364bb8aaefbc203701ba66e23e224ded17b6fb Mon Sep 17 00:00:00 2001 From: Bill Medland Date: Mon, 24 Dec 2001 20:23:57 +0000 Subject: [PATCH] Fixed vsnprintf return value check. --- debugger/winedbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger/winedbg.c b/debugger/winedbg.c index e4134bf938b..6164d8621f8 100644 --- a/debugger/winedbg.c +++ b/debugger/winedbg.c @@ -50,7 +50,7 @@ static char buf[4*1024]; len = vsnprintf(buf, sizeof(buf), format, valist); va_end(valist); - if (len <= -1) { + if (len <= -1 || len >= sizeof(buf)) { len = sizeof(buf) - 1; buf[len] = 0; buf[len - 1] = buf[len - 2] = buf[len - 3] = '.';