Package: bzip2
Version: 1.0.5-0.1
Severity: normal

The bzdiff script doesn't contain enough quotes, so that it doesn't
work if the TMPDIR environment variable is defined and contains
spaces.

The attached patch fixes this problem.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (900, 'stable'), (200, 'unstable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.25-2-powerpc
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages bzip2 depends on:
ii  libbz2-1.0                    1.0.5-0.1  high-quality block-sorting file co
ii  libc6                         2.7-10     GNU C Library: Shared libraries

bzip2 recommends no packages.

Versions of packages bzip2 suggests:
pn  bzip2-doc                     <none>     (no description available)

-- no debconf information
--- /bin/bzdiff 2008-03-25 00:35:33.000000000 +0100
+++ bzdiff      2008-08-04 14:04:06.000000000 +0200
@@ -49,14 +49,14 @@
                 case "$2" in
                *.bz2)
                        F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
-                       tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
+                       tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
                              echo 'cannot create a temporary file' >&2
                              exit 1
                        }
-                        bzip2 -cdfq "$2" > $tmp
-                        bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
+                        bzip2 -cdfq "$2" > "$tmp"
+                        bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
                         STAT="$?"
-                       /bin/rm -f $tmp;;
+                       /bin/rm -f "$tmp";;
 
                 *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
                         STAT="$?";;

Reply via email to