Hugh McMaster : regedit: Prevent out-of-bounds reads when unescaping a string (Valgrind).

Alexandre Julliard julliard at winehq.org
Fri Oct 20 07:19:59 CDT 2017


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Wed Jul 26 13:15:57 2017 +0000

regedit: Prevent out-of-bounds reads when unescaping a string (Valgrind).

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 976c2aa649a526188afd9c0647869ccc82068341)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 programs/regedit/regproc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 5e4c2d2..4d61ab1 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -275,6 +275,7 @@ static int REGPROC_unescape_string(WCHAR* str)
                 str[val_idx] = str[str_idx];
                 break;
             default:
+                if (!str[str_idx]) return FALSE;
                 output_message(STRING_ESCAPE_SEQUENCE, str[str_idx]);
                 str[val_idx] = str[str_idx];
                 break;




More information about the wine-cvs mailing list