Package: netpbm
Version: 2:10.0-15.3+b2
Severity: important
Tags: patch

Dear Maintainer,

   * What led up to the situation?
   Running ppmrainbow followed by any colors causes it to throw an error when
attempting to create a temporary file
   * What was the outcome of this action?
   Use of uninitialized value $tmpdir in sprintf at /usr/bin/ppmrainbow.orig
line 58.
   sh: 1: cannot create /000.ppm: Permission denied
   * What outcome did you expect instead?
   ppmrainbow to output a ppm file

Bug is caused by putting output from tempdir() in $tempdir, instead of expected
$tmpdir (note missing 'e' in latter).

See attached patch for fix.


-- System Information:
Debian Release: 10.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-0.bpo.2-amd64 (SMP w/16 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8),
LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages netpbm depends on:
ii  libc6            2.28-10
ii  libjpeg62-turbo  1:1.5.2-2+deb10u1
ii  libnetpbm10      2:10.0-15.3+b2
ii  libpng16-16      1.6.36-6
ii  libtiff5         4.1.0+git191117-2~deb10u1
ii  zlib1g           1:1.2.11.dfsg-1

Versions of packages netpbm recommends:
ii  ghostscript  9.27~dfsg-2+deb10u4

netpbm suggests no packages.
--- ppmrainbow.orig     2016-01-30 10:51:10.000000000 -0500
+++ ppmrainbow  2020-12-09 18:21:16.490547774 -0500
@@ -49,7 +49,7 @@
 my $numcol = scalar @ARGV;
 push @ARGV, $ARGV[0];
 
-my $tempdir = tempdir("$myname.XXXXXXX", CLEANUP => 1)
+my $tmpdir = tempdir("$myname.XXXXXXX", CLEANUP => 1)
     || die "Cant create tmpdir"; #219019
 my @outlist = ();
 my $n = 0;

Reply via email to