summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch b/meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch
new file mode 100644
index 0000000000..3fb4f432b4
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-twisted/CVE-2022-24801-7.patch
@@ -0,0 +1,27 @@
1From a2fd35cf03bd3a847fd47a6f1a812e359c2dafda Mon Sep 17 00:00:00 2001
2From: Tom Most <twm@freecog.net>
3Date: Sun, 13 Mar 2022 23:57:23 -0700
4Subject: [PATCH] Remove unreachable branch
5
6Upstream-Status: Backport [https://github.com/twisted/twisted/commit/696bfeaf5a1fa7ff952f860c89e2bdcfacef7d7a]
7CVE: CVE-2022-24801
8Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
9---
10 src/twisted/web/http.py | 4 +---
11 1 file changed, 1 insertion(+), 3 deletions(-)
12
13diff --git a/src/twisted/web/http.py b/src/twisted/web/http.py
14index 940ff9f..ea77f57 100644
15--- a/src/twisted/web/http.py
16+++ b/src/twisted/web/http.py
17@@ -1915,9 +1915,7 @@ class _ChunkedTransferDecoder:
18 except ValueError:
19 raise _MalformedChunkedDataError("Chunk-size must be an integer.")
20
21- if length < 0:
22- raise _MalformedChunkedDataError("Chunk-size must not be negative.")
23- elif length == 0:
24+ if length == 0:
25 self.state = "TRAILER"
26 else:
27 self.state = "BODY"