From: ajkhoury aidankhoury@gmail.com
--- dlls/mspatcha/pa19.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mspatcha/pa19.c b/dlls/mspatcha/pa19.c index 569df54408e..4b030d2703d 100644 --- a/dlls/mspatcha/pa19.c +++ b/dlls/mspatcha/pa19.c @@ -2212,9 +2212,9 @@ DWORD apply_patch_to_file_by_buffers( err = GetLastError(); goto cleanup; } - new_file_buf = &decode_buf[old_file_size]; }
+ new_file_buf = &decode_buf[old_file_size]; if (old_file_view != NULL) { old_file_buf = decode_buf; memcpy(old_file_buf, old_file_view, old_file_size); @@ -2448,6 +2448,7 @@ DWORD apply_patch_to_file_by_buffers( goto cleanup; }
+ /* Copy the resulting file data to the new file output */ if (!(apply_option_flags & APPLY_OPTION_TEST_ONLY)) { if (in_new_file_buf == NULL) { @@ -2465,7 +2466,7 @@ cleanup: VirtualFree(retain_buffer, 0, MEM_RELEASE); }
- if (decode_buf != NULL && decode_buf != *pnew_file_buf) { + if (decode_buf != NULL && decode_buf != out_new_file_buf) { VirtualFree(decode_buf, 0, MEM_RELEASE); }