[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
bernd.edlinger at hotmail.de
bernd.edlinger at hotmail.de
Tue Apr 3 14:08:34 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via faddc62b3e657aeb90f4a47e46aeba633964306a (commit)
from e12e3549b79602cdfa888baa23907a8c1e704bd6 (commit)
- Log -----------------------------------------------------------------
commit faddc62b3e657aeb90f4a47e46aeba633964306a
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Mon Apr 2 09:13:49 2018 +0200
Fix range checks with -offset and -length in asn1parse
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
(cherry picked from commit 16e1eea6a67c85c9d786f3c4448182b1aca101b8)
-----------------------------------------------------------------------
Summary of changes:
apps/asn1pars.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index 34f987d..3b80b77 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -244,14 +244,14 @@ int asn1parse_main(int argc, char **argv)
num = tmplen;
}
- if (offset >= num) {
+ if (offset < 0 || offset >= num) {
BIO_printf(bio_err, "Error: offset too large\n");
goto end;
}
num -= offset;
- if ((length == 0) || ((long)length > num))
+ if (length == 0 || length > (unsigned int)num)
length = (unsigned int)num;
if (derout) {
if (BIO_write(derout, str + offset, length) != (int)length) {
More information about the openssl-commits
mailing list