icoutils/0001-Revert-Add-additional-sanity-checks-to-do_resource-..patch
Richard W.M. Jones 86a1ed311e Add a series of upstream patches to enable compiler warnings and
fix multiple issues.

Revert one of the checks which breaks processing of PE binaries.

Removed the 'Group' line, not needed with modern Fedora/RPM.
2017-03-10 12:18:04 +00:00

33 lines
1.1 KiB
Diff

From 559285981565943d63426555a422a420b26522c6 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 10 Mar 2017 12:15:42 +0000
Subject: [PATCH] Revert "Add additional sanity checks to do_resource(). Found
by Jerzy Kramarz <op7ica@gmail.com>."
This reverts commit 8040f36e88baef653fd9896714dc27c239485556.
---
wrestool/restable.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/wrestool/restable.c b/wrestool/restable.c
index fd0ba49..f14dddf 100644
--- a/wrestool/restable.c
+++ b/wrestool/restable.c
@@ -87,13 +87,9 @@ do_resources_recurs (WinLibrary *fi, WinResource *base, WinResource *type_wr,
wr = list_resources (fi, base, &rescnt);
if (wr == NULL)
return;
- if (!check_offset(fi->memory, fi->total_size, fi->name, &wr[0], sizeof(WinResource)))
- return;
/* process each resource listed */
for (c = 0 ; c < rescnt ; c++) {
- if (!check_offset(fi->memory, fi->total_size, fi->name, &wr[c], sizeof(WinResource)))
- break;
/* (over)write the corresponding WinResource holder with the current */
memcpy(WINRESOURCE_BY_LEVEL(wr[c].level), wr+c, sizeof(WinResource));
--
2.10.2