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
An anti-pattern that may occur is using any methods after calling ConsumeRemainingBytes and ConsumeRemainingBytesAsString. They both consume everything left and no call on the data provider should be allowed after it. This should be prevented by throwing exception on any subsequent call.
The text was updated successfully, but these errors were encountered:
The same should happen when remaining_bytes() returns zero. An example of code is:
FuzzedDataProvider data_provider(data, size);
while (data_provider.remaining_bytes()) {
int number = data_provider.ConsumeIntegral<int32_t>();
}
data_provider.ConsumeAnything(); // at this point data_provider is guaranteed to be empty and this call will always return zero-like object.
An anti-pattern that may occur is using any methods after calling
ConsumeRemainingBytes
andConsumeRemainingBytesAsString
. They both consume everything left and no call on the data provider should be allowed after it. This should be prevented by throwing exception on any subsequent call.The text was updated successfully, but these errors were encountered: