Module Name: src
Committed By: rillig
Date: Sat Nov 7 13:21:57 UTC 2020
Modified Files:
src/usr.bin/make: arch.c
Log Message:
make(1): fix access to undefined memory (since 1994-03-18)
This bug was added in arch.c 1.6, "Do extended-name archives".
To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/usr.bin/make/arch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/arch.c
diff -u src/usr.bin/make/arch.c:1.164 src/usr.bin/make/arch.c:1.165
--- src/usr.bin/make/arch.c:1.164 Sat Nov 7 13:17:04 2020
+++ src/usr.bin/make/arch.c Sat Nov 7 13:21:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.164 2020/11/07 13:17:04 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.165 2020/11/07 13:21:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -125,7 +125,7 @@
#include "config.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.164 2020/11/07 13:17:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.165 2020/11/07 13:21:57 rillig Exp $");
typedef struct List ArchList;
typedef struct ListNode ArchListNode;
@@ -438,8 +438,8 @@ ArchStatMember(const char *archive, cons
if (len > AR_MAX_NAME_LEN) {
len = AR_MAX_NAME_LEN;
snprintf(copy, sizeof copy, "%s", member);
+ hdr = HashTable_FindValue(&ar->members, copy);
}
- hdr = HashTable_FindValue(&ar->members, copy);
return hdr;
}
}