blob: 2ade621403ec9cdcf818068b743c28e261d8187a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff -Naur arj-3.10.22/arj_proc.c arj-3.10.22.patched/arj_proc.c
--- arj-3.10.22/arj_proc.c 2005-06-21 15:53:12.000000000 -0400
+++ arj-3.10.22.patched/arj_proc.c 2014-08-06 04:11:35.000000000 -0400
@@ -7,6 +7,7 @@
*
*/
+#include <stdint.h>
#include "arj.h"
DEBUGHDR(__FILE__) /* Debug information block */
@@ -929,9 +930,9 @@
#endif
fclose(stream);
#if SFX_LEVEL>=ARJSFXV
- return(crc32term==st_crc&&fsize==st_fsize);
+ return((uint32_t)crc32term==(uint32_t)st_crc&&(uint32_t)fsize==(uint32_t)st_fsize);
#else
- if(crc32term==st_crc&&fsize==st_fsize)
+ if((uint32_t)crc32term==(uint32_t)st_crc&&(uint32_t)fsize==(uint32_t)st_fsize)
msg_cprintf(0, M_INTEGRITY_OK);
else
pause_error(M_INTEGRITY_VIOLATED);
diff -Naur arj-3.10.22/postproc.c arj-3.10.22.patched/postproc.c
--- arj-3.10.22/postproc.c 2003-06-22 07:12:28.000000000 -0400
+++ arj-3.10.22.patched/postproc.c 2014-08-06 03:22:16.000000000 -0400
@@ -6,6 +6,7 @@
*
*/
+#include <stdint.h>
#include "arj.h"
/* Operations */
@@ -37,8 +38,9 @@
static char buf[PROC_BLOCK_SIZE];
-static void _fput_dword(const unsigned long l, FILE *stream)
+static void _fput_dword(const unsigned long w, FILE *stream)
{
+ uint32_t l = (uint32_t)w;
#ifdef WORDS_BIGENDIAN
fputc(l ,stream);
fputc(l>>8 ,stream);
|