From b9353b73ae47dc7cdfcb55f5b7c3a1d8778954a9 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 8 Mar 2012 09:17:02 +0100 Subject: [PATCH] d3dxof: Check the right offset before dereferencing next byte. --- dlls/d3dxof/parsing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index f40c202e825..9f426c46b54 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -605,7 +605,7 @@ static BOOL is_string(parse_buffer* buf) if (*buf->buffer != '"') return FALSE; - while (pos < buf->rem_bytes && !is_operator(c = *(buf->buffer+pos+1))) + while ((pos+1) < buf->rem_bytes && !is_operator(c = *(buf->buffer+pos+1))) { if (c == '"') { -- 2.11.4.GIT