searches forward for the next undamaged cpio header. This occurred
when the number of bytes returned by the next read operation happened
to be exactly the size of a cpio header. In this case, an off-by-one
error caused this code to decide that it didn't have enough bytes to
examine and then to loop around and ask for the exact same bytes again.
SVN-Revision: 1686
* Scan ahead until we find something that looks
* like an odc header.
*/
- while (p + sizeof(struct cpio_newc_header) < q) {
+ while (p + sizeof(struct cpio_newc_header) <= q) {
switch (p[5]) {
case '1':
case '2':
* Scan ahead until we find something that looks
* like an odc header.
*/
- while (p + sizeof(struct cpio_odc_header) < q) {
+ while (p + sizeof(struct cpio_odc_header) <= q) {
switch (p[5]) {
case '7':
if (memcmp("070707", p, 6) == 0