Commit f41eb861 authored by Adam Langley's avatar Adam Langley
Browse files

Switch an assert back to a check.

The assert was supposed to be *added* in fcf25833 but instead replaced
the check.

BUG=465557

Change-Id: I0d3db5038515021e5bdd1ccb9ff08d4f78552621
Reviewed-on: https://boringssl-review.googlesource.com/3850

Reviewed-by: default avatarDavid Benjamin <[email protected]>
Reviewed-by: default avatarAdam Langley <[email protected]>
parent 10bec39d
......@@ -201,7 +201,10 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) {
rb->offset = len + align;
}
assert(n <= (int)(rb->len - rb->offset));
if (n > (int)(rb->len - rb->offset)) {
OPENSSL_PUT_ERROR(SSL, ssl3_read_n, ERR_R_INTERNAL_ERROR);
return -1;
}
if (!s->read_ahead) {
/* ignore max parameter */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment