You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
843 B
29 lines
843 B
Last-Update: 2014-11-15 |
|
Forwarded: yes |
|
From: Adam Sampson <ats@offog.org> |
|
Bug-Debian: http://bugs.debian.org/684600 |
|
Description: fix large files processing. |
|
|
|
--- a/src/core_fileio.c |
|
+++ b/src/core_fileio.c |
|
@@ -109,12 +109,18 @@ |
|
|
|
buf[4] = 0; |
|
|
|
if (be_val) |
|
- *be_val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; |
|
+ *be_val = (((unsigned long)buf[0]) << 24) |
|
+ | (((unsigned long)buf[1]) << 16) |
|
+ | (((unsigned long)buf[2]) << 8) |
|
+ | ((unsigned long)buf[3]); |
|
|
|
if (le_val) |
|
- *le_val = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; |
|
+ *le_val = (((unsigned long)buf[3]) << 24) |
|
+ | (((unsigned long)buf[2]) << 16) |
|
+ | (((unsigned long)buf[1]) << 8) |
|
+ | ((unsigned long)buf[0]); |
|
|
|
if (tag_val) |
|
tagcpy(tag_val,buf); |
|
|
|
|