From 5fac3e6f3aa3ffcb19b42d9471184aabfcf55fbd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 15 May 2003 05:10:28 +0000 Subject: [PATCH] fix a buffer underflow --- tools/qfcc/source/qfcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index 198e32759..72db82611 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -573,7 +573,7 @@ separate_compile (void) f = output_file->str + strlen (output_file->str); while (f >= output_file->str && *f != '.' && *f != '/') f--; - if (*f == '.') { + if (f >= output_file->str && *f == '.') { output_file->size -= strlen (f); dstring_appendstr (extension, f); *f = 0;