]> git.pld-linux.org Git - packages/mpg321.git/commitdiff
- (from Debian's 0.2.10.3) format string fixes (CAN-2003-969, BTS#812), fd leak
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 2 Feb 2004 12:34:37 +0000 (12:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mpg321-debian.patch -> 1.1

mpg321-debian.patch [new file with mode: 0644]

diff --git a/mpg321-debian.patch b/mpg321-debian.patch
new file mode 100644 (file)
index 0000000..bbc012d
--- /dev/null
@@ -0,0 +1,65 @@
+From Debian's mpg321-0.2.10.3 package:
+
+mpg321 (0.2.10.3) unstable; urgency=high
+
+  * Non-maintainer upload by the Security Team
+  * Fix format string vulnerabilities (CAN-2003-0969)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sun,  4 Jan 2004 11:50:39 -0800
+
+mpg321 (0.2.10.1-1.1) unstable; urgency=low
+
+  * NMU
+  * Apply patch to close fd (Closes: Bug#178948)
+
+ -- Mario Lang <mlang@debian.org>  Mon, 31 Mar 2003 10:56:12 +0200
+
+diff -Nur mpg321-0.2.10/mpg321.c mpg321-0.2.10.1/mpg321.c
+--- mpg321-0.2.10/mpg321.c     Sun Mar 24 06:49:20 2002
++++ mpg321-0.2.10.1/mpg321.c   Sun Jan  4 20:51:13 2004
+@@ -188,7 +188,7 @@
+             
+             else
+             {
+-                printf(names[i]);
++                printf("%s", names[i]);
+                 free(names[i]);
+             }
+         }
+@@ -203,7 +203,7 @@
+             if (!names[i])  {
+                 fprintf (stderr, emptystring);
+             }   else    {
+-                fprintf (stderr, names[i]);
++                fprintf (stderr, "%s", names[i]);
+                 free (names[i]);
+             }
+             if (i%2) fprintf (stderr, "\n");
+@@ -410,12 +410,14 @@
+             
+             if(fstat(fd, &stat) == -1)
+             {
++                close(fd);
+                 mpg321_error(currentfile);
+                 continue;
+             }
+             
+             if (!S_ISREG(stat.st_mode))
+             {
++                close(fd);
+                 continue;
+             }
+             
+@@ -432,10 +434,12 @@
+             if((playbuf.buf = mmap(0, playbuf.length, PROT_READ, MAP_SHARED, fd, 0))
+                                 == MAP_FAILED)
+             {
++                close(fd);
+                 mpg321_error(currentfile);
+                 continue;
+             }
+             
++            close(fd);
+             playbuf.frames[0] = playbuf.buf;
+             
+             mad_decoder_init(&decoder, &playbuf, read_from_mmap, read_header, /*filter*/0,
This page took 0.065022 seconds and 4 git commands to generate.