mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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:
parent
44d1585458
commit
07dbacb578
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue