summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-10 08:06:47 +0100
committerIngo Molnar <mingo@kernel.org>2017-11-10 08:06:47 +0100
commit91a6a6cfee8ad34ea4cc10a54c0765edfe437cdb (patch)
treedbea28420ff33aca40be8d3cd901305064b4ea24 /lib
parentd04fdafc066fed10cc9610b2f36f1d0ff0327864 (diff)
parent1c9dbd4615fd751e5e0b99807a3c7c8612e28e20 (diff)
downloadlinux-91a6a6cfee8ad34ea4cc10a54c0765edfe437cdb.tar.gz
linux-91a6a6cfee8ad34ea4cc10a54c0765edfe437cdb.tar.bz2
linux-91a6a6cfee8ad34ea4cc10a54c0765edfe437cdb.zip
Merge branch 'linus' into x86/asm, to resolve conflict
Conflicts: arch/x86/mm/mem_encrypt.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1_decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index fef5d2e114be..1ef0cec38d78 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -228,7 +228,7 @@ next_op:
hdr = 2;
/* Extract a tag from the data */
- if (unlikely(dp >= datalen - 1))
+ if (unlikely(datalen - dp < 2))
goto data_overrun_error;
tag = data[dp++];
if (unlikely((tag & 0x1f) == ASN1_LONG_TAG))
@@ -274,7 +274,7 @@ next_op:
int n = len - 0x80;
if (unlikely(n > 2))
goto length_too_long;
- if (unlikely(dp >= datalen - n))
+ if (unlikely(n > datalen - dp))
goto data_overrun_error;
hdr += n;
for (len = 0; n > 0; n--) {