ELF parser: fix off-by-one error
I don't know why Arvid subtracted 1 when he wrote this code. But it was wrong. Fortunately, the section size was not used afterwards, but the next commit will. Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
1f27c1161b
commit
b773a02318
@ -224,7 +224,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
|
|||||||
return Corrupt;
|
return Corrupt;
|
||||||
}
|
}
|
||||||
*pos = sh.offset;
|
*pos = sh.offset;
|
||||||
*sectionlen = sh.size - 1;
|
*sectionlen = sh.size;
|
||||||
if (shnam[1] == 'q')
|
if (shnam[1] == 'q')
|
||||||
return QtMetaDataSection;
|
return QtMetaDataSection;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user