[PATCH v2 01/10] wrc: Declare the data buffer as unsigned char.
Martin Storsjo
martin at martin.st
Mon Dec 8 03:26:51 CST 2014
When reading the already written data (as in get_dword in genres.c),
bytes with a value >= 128 would be interpreted as negative.
Alternative, casts to unsigned char would have to be added
to get_dword.
This can be triggered when writing resources with a long
name, such as "api_ms_win_core_winrt_string_l1_1_0_test.exe".
---
tools/wrc/wrctypes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/wrc/wrctypes.h b/tools/wrc/wrctypes.h
index fdb3862..d71c4ac 100644
--- a/tools/wrc/wrctypes.h
+++ b/tools/wrc/wrctypes.h
@@ -97,7 +97,7 @@ typedef struct res {
unsigned int allocsize; /* Allocated datablock size */
unsigned int size; /* Actual size of data */
unsigned int dataidx; /* Tag behind the resource-header */
- char *data;
+ unsigned char *data;
} res_t;
/* Resource strings are slightly more complex because they include '\0' */
--
1.8.1.2
More information about the wine-patches
mailing list