You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many times when reading data from disk, we read a length and immediately ask the OS to ensure a Vec can hold that much data, potentially resizing the Vec.
If there is an issue with the data on-disk, this could lead to attempting to allocate too much data. The subsequent read call will fail due to an EOF, if the allocation succeeds.
Before requesting a resize or reservation, we should check that the bytes requested are less than or equal to the number of bytes that remain in the reader.
The text was updated successfully, but these errors were encountered:
Many times when reading data from disk, we read a length and immediately ask the OS to ensure a Vec can hold that much data, potentially resizing the Vec.
If there is an issue with the data on-disk, this could lead to attempting to allocate too much data. The subsequent read call will fail due to an EOF, if the allocation succeeds.
Before requesting a resize or reservation, we should check that the bytes requested are less than or equal to the number of bytes that remain in the reader.
The text was updated successfully, but these errors were encountered: