Package: mimms
Version: 0.0.9-1
Followup-For: Bug #279165

There hasn't been a mimms release since the bug was filed, but here's a
patch which gracefully exists in this situation.  This was tested
against the reproduction case of an invalid mms URL.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages mimms depends on:
ii  libc6               2.3.2.ds1-22         GNU C Library: Shared libraries an
ii  libgcc1             1:4.0.0-11           GCC support library
ii  libpopt0            1.7-5                lib for parsing cmdline parameters
ii  libstdc++5          1:3.3.6-7            The GNU Standard C++ Library v3
ii  libuuid1            1.37+1.38-WIP-0620-1 universally unique id library

mimms recommends no packages.

-- no debconf information
--- mimms-0.0.9/mimms.cpp	2004-10-22 07:38:33.000000000 -0700
+++ mimms-0.0.9.crashesless/mimms.cpp	2005-06-28 00:01:51.000000000 -0700
@@ -710,7 +710,14 @@
   num_stream_ids = 0;
   /* get_headers(s, asf_header);  */
 
-  asf_header_len = get_header (s, asf_header);
+  if ((asf_header_len = get_header (s, asf_header)) == 0) {
+    close (output_fh);
+    if (unlink (file) < 0)
+      perror (file);
+    close (s);
+    return 1;
+  }
+
   packet_length = interp_header (asf_header, asf_header_len);
 
   /* 0x33 */

Reply via email to