Attention is currently required from: Furquan Shaikh, Angel Pons.
1 comment:
File util/cbfstool/cbfs_glue.h:
Patch Set #21, Line 15: buffer_size(&dev->buffer) - offset < size)
AFAIUI, this check is to ensure `dev->buffer` is large enough to read `size` bytes at `offset`. […]
Yes, it's essentially the same thing, but it's written slightly more complicated to be overflow-safe. In your example, if (offset + size) was larger than the max value that can fit in size_t, the check might not catch it.
Granted, for cbfstool this is less likely to be an issue, but it doesn't hurt to be careful.
To view, visit change 41121. To unsubscribe, or for help writing mail filters, visit settings.