From 73eff6652ac9671522a07155a97104f36ca7f8da Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 22 Nov 2015 21:37:20 +0100 Subject: [PATCH] d3dxof: Avoid undefined behavior in parse_object_parts. Signed-off-by: Thomas Faber Signed-off-by: Alexandre Julliard --- dlls/d3dxof/parsing.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index 769e815e751..54566b08e87 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -1349,7 +1349,8 @@ _exit: return FALSE; } - buf->pxo = buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects++]; + buf->pxo = buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects]; + pxo->root->nb_subobjects++; TRACE("Enter optional %s\n", (char*)buf->value); buf->level++;