From b4575a40fc30474920f4f867944cfd3fb7aa876c Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 23 Jun 2012 13:09:44 +0200 Subject: Rename hwrev to hwrevs and fix unpacking fiasco images. hwrevs do not have to be separated by nullterm if size of hwrev is 8. --- src/fiasco.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'src/fiasco.c') diff --git a/src/fiasco.c b/src/fiasco.c index 7fccc4b..960a1de 100644 --- a/src/fiasco.c +++ b/src/fiasco.c @@ -125,7 +125,7 @@ int openfiasco(const char *name, const char *piece_grep, int v) /* XXX this is not ok */ //printf("BUF8: %02x\n", buf[8]); memset(header.device, 0, sizeof(header.device)); - memset(header.hwrev, 0, sizeof(header.hwrev)); + memset(header.hwrevs, 0, sizeof(header.hwrevs)); memset(header.version, 0, sizeof(header.version)); if (header.layout) { free(header.layout); @@ -151,6 +151,11 @@ int openfiasco(const char *name, const char *piece_grep, int v) pdata = data; pdataend = data+i; while(pdata 8) + pdata += 8; + else + pdata += strlen((char*)pdata)+1; for(;*pdata=='\0' && pdata