From c162742e0d3cc73402993fd6e5d6bda018c09fb0 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Thu, 16 Dec 2004 11:58:45 +0000 Subject: [PATCH] * libltdl/ltdl.c (trim): Return error rather than do bogus null pointer arithmetic when parsing a malformed .la file. --- ChangeLog | 5 +++++ libltdl/ltdl.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 485b572b5..8ef7596cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-16 Ralf Wildenhues + + * libltdl/ltdl.c (trim): Return error rather than do bogus + null pointer arithmetic when parsing a malformed .la file. + 2004-12-13 Albert Chin-A-Young * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index cd99acceb..c89690c02 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -2997,6 +2997,9 @@ trim (dest, str) LT_DLFREE (*dest); + if (!end) + return 1; + if (len > 3 && str[0] == '\'') { tmp = LT_EMALLOC (char, end - str); -- 2.47.3