bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wrong pointer usage in install-info.c


From: Thomas Thorberger
Subject: wrong pointer usage in install-info.c
Date: Wed, 30 Apr 2008 11:59:57 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080213)


Hello,

while upgrading from texinfo version 4.11 to 4.12 I noticed that install-info crashes with some info files. Debugging it I found that in install-info.c in the function split_entry() was tried to strdup() a pointer that was previously found to be invalid. I attached a diff that corrects this.

Regards,
 Thomas Thorberger

---
Where bug was observed:
OS: Solaris 9 and Solaris 10 with gcc-4.3.0
Info file: gnat_ugn_unw.info (from gcc-4.3.0 distribution)
install-info (GNU texinfo) 4.12

--- texinfo-4.12/install-info/install-info.c.orig       2008-04-30 
11:34:00.383995000 +0200
+++ texinfo-4.12/install-info/install-info.c    2008-04-30 11:34:12.264410000 
+0200
@@ -1455,11 +1455,11 @@
   if (!ptr)
     {
       size_t length = strlen (entry);
       if (length == 0)
         return;
-      *name = strdup (ptr);
+      *name = strdup (entry);
       *name_len = length + 1;
       return;
     }
 
   /* The name is everything up to and including the period. */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]