Skip to Content.
Sympa Menu

sm-grimoire - [SM-Grimoire] libgrimoire/uncompress bugfix

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: Seth Woolley <seth AT tautology.org>
  • To: sm-grimoire AT lists.ibiblio.org, "" <sm-sorcery AT lists.ibiblio.org>
  • Subject: [SM-Grimoire] libgrimoire/uncompress bugfix
  • Date: Sun, 5 Jan 2003 03:28:15 -0800 (PST)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

future discussion of this bug on sm-sorcery... so remove sm-grimoire on
any replies.

OK, I believe the only change that needs to be made is this:

uncompress() {

# Outer subshell is necessary to redirect stderr to stdout
(
#Inner subshell decompresses archive to stdout
# Then outside the inner subshell, the stdout is tee'ed
# and md5 checked.
(
case $2 in
bzip2) bzip2 -cdf $1 ;;
gzip) gzip -cdf $1 ;;
compress*) gzip -cdf $1 ;;
Zip) cat $1 ;;
RPM) rpmunpack < $1 | gzip -cd ;;
tar) cat $1 ;;
*) false ;;
esac
) | tee /dev/stderr | md5_tar_check $3 2>&1 1>/dev/null #we must avoid
this printing
) 2>&1

<snip>

}


the *) false ;; line needs to say cat instead of false, otherwise the md5
is the empty md5 and that is bad because it has no relation to what is
actually in the file we are checking, and thus fully trojanable. so:

- - *) false ;;
+ *) cat ;;

Seth

On Sun, 5 Jan 2003, Seth Woolley wrote:

> Source for md5unpack: http://irc.positivism.org:8080/bin/misc/md5unpack
> (I overloaded uncompress function, and will be overloading it more to get
> more files that the original function missed, and then submit it as a
> patch to a bug once every file in the grimoires are accounted for.)

- --
Seth Alan Woolley <seth at tautology.org>, SPAM/UCE is unauthorized
Key id 7BEACC7D = 2978 0BD1 BA48 B671 C1EB 93F7 EDF4 3CDF 7BEA CC7D
Full Key at seth.tautology.org, see www.gnupg.org www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)

iD8DBQE+GBbS7fQ833vqzH0RAlIIAJ901nU06WAYnYPbjS2TKJ9ACDiYDwCfSu/j
LQPX37s6y91mAIPbpxi5CDg=
=/lru
-----END PGP SIGNATURE-----





Archive powered by MHonArc 2.6.24.

Top of Page