Piotr Caban : msvcrt: Return error when previously parsed type is accessed while demangling simple data type.

Alexandre Julliard julliard at winehq.org
Mon Aug 22 07:32:39 CDT 2016


Module: wine
Branch: stable
Commit: 31b09cda4a4ca7b960ff8157c289ce13754824f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=31b09cda4a4ca7b960ff8157c289ce13754824f2

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Jul  8 15:34:44 2016 +0200

msvcrt: Return error when previously parsed type is accessed while demangling simple data type.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 42c2799589ae7f805e5f67a2b04f24e4aa3e0b34)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/msvcrt/undname.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c
index beaec4f..ec2c2dd 100644
--- a/dlls/msvcrt/undname.c
+++ b/dlls/msvcrt/undname.c
@@ -904,6 +904,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
     case '5': case '6': case '7': case '8': case '9':
         /* Referring back to previously parsed type */
         /* left and right are pushed as two separate strings */
+        if (!pmt_ref) goto done;
         ct->left = str_array_get_ref(pmt_ref, (dt - '0') * 2);
         ct->right = str_array_get_ref(pmt_ref, (dt - '0') * 2 + 1);
         if (!ct->left) goto done;




More information about the wine-cvs mailing list