Patch set 5:Code-Review +2
5 comments:
Patch Set #5, Line 43: image + size - 0x10
Yes, it does. So what is the problem? […]
Yes, sorry, there is no problem, I was just double-checking that that was how it was parsed (since the other way can cause problems).
Patch Set #5, Line 51: image + size - 0x80
Ditto
Done
Patch Set #5, Line 69: image + size - mb_part_offset
Ditto
Done
Patch Set #5, Line 70: image + size - mb_vendor_offset
Ditto
Done
Patch Set #5, Line 99: (len - sizeof(struct fmap))
Sure, but not part of this patch (the problem is in the subtraction not the […]
Gah! C is crazy. We only use off_t since this function needs to return negative error values (mumble mumble grumble), so we could just use size_t for `offset`, add an if check before the loop, and then do a cast to off_t at the very end when we return. Either that, or leave it as-is for now and change it in a follow-up. (Also, now that I think about it the signed version of size_t is ssize_t, not off_t, so perhaps a follow-up is better.)
To view, visit change 30409. To unsubscribe, or for help writing mail filters, visit settings.