Blame SOURCES/0028-Fix-for-CVE-2021-25217.patch
|
|
df4638 |
From 02b4ae1953d39f1b6c3f0e63aefb72114039ab50 Mon Sep 17 00:00:00 2001
|
|
|
df4638 |
From: Pavel Zhukov <pzhukov@redhat.com>
|
|
|
df4638 |
Date: Tue, 22 Jun 2021 06:56:29 +0200
|
|
|
df4638 |
Subject: [PATCH 28/29] Fix for CVE-2021-25217
|
|
|
df4638 |
Cc: pzhukov@redhat.com
|
|
|
df4638 |
|
|
|
df4638 |
---
|
|
|
df4638 |
common/parse.c | 5 +++--
|
|
|
df4638 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
df4638 |
|
|
|
df4638 |
diff --git a/common/parse.c b/common/parse.c
|
|
|
df4638 |
index f17bc0b..4e8b408 100644
|
|
|
df4638 |
--- a/common/parse.c
|
|
|
df4638 |
+++ b/common/parse.c
|
|
|
df4638 |
@@ -5587,13 +5587,14 @@ int parse_X (cfile, buf, max)
|
|
|
df4638 |
skip_to_semi (cfile);
|
|
|
df4638 |
return 0;
|
|
|
df4638 |
}
|
|
|
df4638 |
- convert_num (cfile, &buf [len], val, 16, 8);
|
|
|
df4638 |
- if (len++ > max) {
|
|
|
df4638 |
+ if (len >= max) {
|
|
|
df4638 |
parse_warn (cfile,
|
|
|
df4638 |
"hexadecimal constant too long.");
|
|
|
df4638 |
skip_to_semi (cfile);
|
|
|
df4638 |
return 0;
|
|
|
df4638 |
}
|
|
|
df4638 |
+ convert_num (cfile, &buf [len], val, 16, 8);
|
|
|
df4638 |
+ len++;
|
|
|
df4638 |
token = peek_token (&val, (unsigned *)0, cfile);
|
|
|
df4638 |
if (token == COLON)
|
|
|
df4638 |
token = next_token (&val,
|
|
|
df4638 |
--
|
|
|
df4638 |
2.26.3
|
|
|
df4638 |
|