Check return value on write of raw pointer
This commit is contained in:
parent
38508e9bbb
commit
1da9ffe394
@ -942,7 +942,10 @@ static void GPBWriteRawLittleEndian64(GPBOutputBufferState *state,
|
||||
state_.position = length;
|
||||
} else {
|
||||
// Write is very big. Let's do it all at once.
|
||||
[state_.output write:((uint8_t *)value) + offset maxLength:length];
|
||||
NSInteger written = [state_.output write:((uint8_t *)value) + offset maxLength:length];
|
||||
if (written != (NSInteger)length) {
|
||||
[NSException raise:GPBCodedOutputStreamException_WriteFailed format:@""];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user