diff options
author | Kenny Root <kroot@google.com> | 2015-03-16 22:01:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-16 22:02:30 +0000 |
commit | b051df5cb1e83aa9ffdfe28406b6d9e33321912a (patch) | |
tree | a5ab17fa93c03403cf3289e8cfed45f668ac5de1 /src | |
parent | 1ba8594f0bbcc6e06b1acc121f74fe806bb21edb (diff) | |
parent | cade762cbfb5253526da0ffec7e7d12d12902bf6 (diff) | |
download | external_boringssl-b051df5cb1e83aa9ffdfe28406b6d9e33321912a.zip external_boringssl-b051df5cb1e83aa9ffdfe28406b6d9e33321912a.tar.gz external_boringssl-b051df5cb1e83aa9ffdfe28406b6d9e33321912a.tar.bz2 |
Merge "Switch an assert back to a check."
Diffstat (limited to 'src')
-rw-r--r-- | src/ssl/s3_pkt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ssl/s3_pkt.c b/src/ssl/s3_pkt.c index 4263cb0..3a42c3a 100644 --- a/src/ssl/s3_pkt.c +++ b/src/ssl/s3_pkt.c @@ -202,6 +202,10 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) { } 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 */ |