diff options
author | B. Watson <yalhcru@gmail.com> | 2015-04-07 19:58:35 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-04-07 19:58:35 +0700 |
commit | 51604f30957277f0f1cdecd4fcc2d8e1040a5859 (patch) | |
tree | fd53149b90a1950415cd0daedf13915aa38ecbef /system/arj/patches/self_integrity_64bit.patch | |
parent | f62f19ede487f36a8a3604f3ad843ee241b9284d (diff) | |
download | slackbuilds-51604f30957277f0f1cdecd4fcc2d8e1040a5859.tar.gz |
system/arj: Security fixes.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/arj/patches/self_integrity_64bit.patch')
-rw-r--r-- | system/arj/patches/self_integrity_64bit.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/system/arj/patches/self_integrity_64bit.patch b/system/arj/patches/self_integrity_64bit.patch new file mode 100644 index 0000000000..f9ceb2ffe9 --- /dev/null +++ b/system/arj/patches/self_integrity_64bit.patch @@ -0,0 +1,52 @@ +Description: Fix arj self-integrity check on 64-bit systems +Author: B Watson <yalhcru@gmail.com> +Origin: other, http://slackbuilds.org/cgit/slackbuilds/tree/system/arj/patches/SBo_integrity_64bit.patch +Forwarded: no +Reviewed-By: Guillem Jover <guillem@debian.org> +Last-Update: 2014-08-06 + +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); |