Your message dated Mon, 01 Nov 2010 23:54:38 +0000
with message-id <[email protected]>
and subject line Bug#534757: fixed in unhtml 2.3.9-1
has caused the Debian Bug report #534757,
regarding unhtml: off by one allocation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
534757: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534757
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: unhtml
Version: 2.3.9
Tags: patch

Too few bytes are allocated;
check is for if (i>tag_size-1) but on EOF a NULL is also written.

I also took the opportunity to remove an unnecessary and probably not
useful re-allocation.

--- unhtml-2.3.9/unhtml.c       2009-06-26 16:20:07.000000000 -0700
+++ /tmp/unhtml-2.3.9/unhtml.c  2009-06-26 16:20:52.000000000 -0700
@@ -130,30 +130,16 @@
             m_putchar(tag[j]);
        }
 
-       if (tag_size > MAX_TAG_SIZE) {
-         free(tag);
-         tag_size = MAX_TAG_SIZE;
-         tag = (char *)malloc(tag_size);
-         if (!tag) {
-            fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", 
tag_size);
-            return 1;
-         }
-       }
-
         break;
       }
 
-      if (i > (tag_size - 1)) {
-       while (tag_size < i)
-         tag_size *= 2;
-       tmp = (char *)malloc(tag_size);
+                       if (i >= tag_size-1) {
+                               tag_size <<= 1;
+                               tmp = realloc(tag, tag_size);
         if (!tmp) {
           fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", tag_size);
           return 1;
         }
-       memset(tmp, 0, tag_size);
-       memcpy(tmp, tag, i);
-       free(tag);
         tag = tmp;
       }
 
@@ -225,17 +211,13 @@
           tag[i] = ch;
           i++;
 
-          if (i > (tag_size - 1)) {
-           while (tag_size < i)
-             tag_size *= 2;
-           tmp = (char *)malloc(tag_size);
+                                       if (i >= tag_size-1) {
+                                               tag_size <<= 1;
+                                               tmp=realloc(tag, tag_size);
             if (!tmp) {
               fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", 
tag_size);
               return 1;
             }
-           memset(tmp, 0, tag_size);
-           memcpy(tmp, tag, i);
-           free(tag);
             tag = tmp;
           }
 



--- End Message ---
--- Begin Message ---
Source: unhtml
Source-Version: 2.3.9-1

We believe that the bug you reported is fixed in the latest version of
unhtml, which is due to be installed in the Debian FTP archive:

unhtml_2.3.9-1.debian.tar.gz
  to main/u/unhtml/unhtml_2.3.9-1.debian.tar.gz
unhtml_2.3.9-1.dsc
  to main/u/unhtml/unhtml_2.3.9-1.dsc
unhtml_2.3.9-1_i386.deb
  to main/u/unhtml/unhtml_2.3.9-1_i386.deb
unhtml_2.3.9.orig.tar.gz
  to main/u/unhtml/unhtml_2.3.9.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jari Aalto <[email protected]> (supplier of updated unhtml package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 25 Oct 2010 19:28:16 +0300
Source: unhtml
Binary: unhtml
Architecture: source i386
Version: 2.3.9-1
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <[email protected]>
Changed-By: Jari Aalto <[email protected]>
Description: 
 unhtml     - Remove the markup tags from an HTML file
Closes: 364236 534757
Changes: 
 unhtml (2.3.9-1) unstable; urgency=low
 .
   * QA upload.
     - Move to packaging format "3.0 (quilt)".
   * debian/clean
     - New file.
   * debian/chnagelog
     - Fix Debian version to *-1.
   * debian/compat
     - Update to 8.
   * debian/control
     - (Build-Depends): update to debhelper 8.
     - (Depends): add ${misc:Depends}.
     - (Maintainer): Set to Debian QA Group.
     - (Standards-Version): update to 3.9.1.
   * debian/copyright
     - Update layout.
   * debian/{docs,manpages}
     - New file.
   * debian/patches
     - (10): New. Make 8-bit clean (Closes: #364236).
     - (20): New. Off by one allocation (Closes: #534757).
   * debian/rules
     - (CC): Remove hard coded variable.
     - Update to dh(1).
   * debian/source/format
     - New file.
Checksums-Sha1: 
 9fb9f3de1f6d50b248dd1e9eb1446bfc5caf8aa5 1604 unhtml_2.3.9-1.dsc
 ee8b29c72c0d7ec8ee2c51379a5f501924dedc35 12914 unhtml_2.3.9.orig.tar.gz
 6ad00b8ab82088d7a1ad60fa6af485b7e944ba79 5371 unhtml_2.3.9-1.debian.tar.gz
 b0e20dd0f2515321d0f69e7550196328a181714f 11816 unhtml_2.3.9-1_i386.deb
Checksums-Sha256: 
 8ef3f98801b9e2b9081d3d10fca136090e2ebae961cf1b2fcea264b41314a4d0 1604 
unhtml_2.3.9-1.dsc
 ddb2afd08b9304de1645332be668bd2aea65eaa0190aa37c0df2200d3bee96c0 12914 
unhtml_2.3.9.orig.tar.gz
 0328b1d83b0929df090ae01efce6abab895b7166a3e5fedd065365593cea4265 5371 
unhtml_2.3.9-1.debian.tar.gz
 a782a16bcf853385a8f2d9c943c0e4b0111bb50d9027d96b5e61223d06a06dc1 11816 
unhtml_2.3.9-1_i386.deb
Files: 
 8521307759006eab1b885aacdf557e81 1604 text extra unhtml_2.3.9-1.dsc
 bd9994c40f84df2c64d489247670c58f 12914 text extra unhtml_2.3.9.orig.tar.gz
 5cded936835f57be6cea07e059adcfa6 5371 text extra unhtml_2.3.9-1.debian.tar.gz
 90548c1fef14592de12e04e602677e16 11816 text extra unhtml_2.3.9-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJMz01eAAoJECHSBYmXSz6WoE4QAMrwy551cMHa1Z0Rl4QICZBM
27pIoV+sXtcK90qq/zjzlH2LrOJmbwVi+EzBIkH1uWP4gPdfj0wgoH6jE0ryGewR
petR4cndLX8JEqTluXwmC878CEcX03+E+CGpHTTAIFVr5F0/4AofBDmwKILQEniC
9Egp0mx6Y7n3UmveNlogprJugKH7IPqEZBuamRuxCRREWk+iwJK+x9RyYBVIvLhS
DRoBeeHKEdRQjJei6HPMAMBxUChbmPBvpdbQ1R/ZOkuapy/lW/7VCoVuoH0r0AtC
2z2XTiMaj3c6iNGZCtFVs4OwuTaqHpFw+002gG3QIbNwHGkGPRDUhHzTn7mnfefY
L0acONfcX+uUVhI0L6mwRZcYPnzJ2xauRkTnkyd5arcEhbRxoXes2GpxZBchXTN1
PI8OtK4Rk5sEjR6HWyp0ErNXynpGOLl/AecBDqbH+CIwoDiFOIkeqqlJdFIpapiz
viMTMG1/bY4k3pEFKwRD/85vxQN4wuEuZiI4K1rPSfyXs/8F73ClhSMrD/4njNDA
Wm+7OcCaJvrA7mK+lFg5OKLLYBjavQaZm83y+Bfw8RCS2DZhbrESIorU27EfmoUh
dqAHpSgFY7oDQOM+56eWk1eItxhsDRgeMX4OoDay/Jn4xBxiqPzGTNl15X9oEusF
/LzefNU4VllN/cQfy6Or
=YY3r
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to