Thomas Faber : d3dxof: Avoid undefined behavior in parse_object_parts.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 23 09:59:46 CST 2015


Module: wine
Branch: master
Commit: 73eff6652ac9671522a07155a97104f36ca7f8da
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=73eff6652ac9671522a07155a97104f36ca7f8da

Author: Thomas Faber <thomas.faber at reactos.org>
Date:   Sun Nov 22 21:37:20 2015 +0100

d3dxof: Avoid undefined behavior in parse_object_parts.

Signed-off-by: Thomas Faber <thomas.faber at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 769e815..54566b0 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++;




More information about the wine-cvs mailing list