summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-06-13 22:47:40 +0000
committerPaul Smith <psmith@gnu.org>2009-06-13 22:47:40 +0000
commit38b23bc3f02ec199370865be9bd970e6318fa1d2 (patch)
tree9c0a86f970b96b77546a79bb87e3a13a14b579c3
parentbf9822658f50510d997da9d8c0c828dd7e26d6a6 (diff)
downloadgunmake-38b23bc3f02ec199370865be9bd970e6318fa1d2.tar.gz
- Fixes Savannah bug #18435
-rw-r--r--ChangeLog4
-rw-r--r--ar.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e53a55..92637f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-06-13 Paul Smith <psmith@gnu.org>
+ * ar.c (ar_name): Ensure that targets with empty parens aren't
+ considered archive member references: archive members must have a
+ non-empty "member" string. Fixes Savannah bug #18435.
+
* function.c (string_glob): Rely on multi_glob() to determine
whether files exist or not. Remove call to file_exists_p() which
is not always correct. Fixes Savannah bug #21231.
diff --git a/ar.c b/ar.c
index bb9c9ed..304ee9c 100644
--- a/ar.c
+++ b/ar.c
@@ -24,8 +24,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "dep.h"
#include <fnmatch.h>
-/* Return nonzero if NAME is an archive-member reference, zero if not.
- An archive-member reference is a name like `lib(member)'.
+/* Return nonzero if NAME is an archive-member reference, zero if not. An
+ archive-member reference is a name like `lib(member)' where member is a
+ non-empty string.
If a name like `lib((entry))' is used, a fatal error is signaled at
the attempt to use this unsupported feature. */
@@ -39,7 +40,7 @@ ar_name (const char *name)
return 0;
end = p + strlen (p) - 1;
- if (*end != ')')
+ if (*end != ')' || end == p + 1)
return 0;
if (p[1] == '(' && end[-1] == ')')