Fix unexplained magic value and make it future-proof.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@789 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Carl-Daniel Hailfinger 2008-08-18 21:11:05 +00:00
parent 44d1585458
commit 07dbacb578

View file

@ -114,7 +114,7 @@ int find_file(const struct mem_file *archive, const char *filename, struct mem_f
for (walk = archive->start;
(walk < (char *)(archive->start + archive->len - sizeof(struct lar_header))) &&
(walk >= (char *)archive->start); walk += 16) {
if (strncmp(walk, MAGIC, 8) != 0)
if (strncmp(walk, MAGIC, sizeof(header->magic)) != 0)
continue;
header = (struct lar_header *)walk;