]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (trim): Return error rather than do bogus
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 16 Dec 2004 12:00:09 +0000 (12:00 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 16 Dec 2004 12:00:09 +0000 (12:00 +0000)
null pointer arithmetic when parsing a malformed .la file.

ChangeLog
libltdl/ltdl.c

index 32bc8cfbae58ac98f93ecf2662f9a1da69b30b0b..31ded3dc19f0270314218acbada657690c47d8cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-16  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/ltdl.c (trim): Return error rather than do bogus
+       null pointer arithmetic when parsing a malformed .la file.
+
 2004-12-13  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
        * libltdl/lt__strl.c, libltdl/libltdl/lt__strl.h: New files to
index c2be797916aa5d863f291814bd9f54acafea0170..219887441b3a97ba436da4e042f7d6748d2f1828 100644 (file)
@@ -901,6 +901,9 @@ trim (char **dest, const char *str)
 
   FREE (*dest);
 
+  if (!end)
+    return 1;
+
   if (len > 3 && str[0] == '\'')
     {
       tmp = MALLOC (char, end - str);