diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2022-47010.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2022-47010.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2022-47010.patch b/meta/recipes-devtools/binutils/binutils/CVE-2022-47010.patch new file mode 100644 index 0000000000..d831ed4756 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2022-47010.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 0d02e70b197c786f26175b9a73f94e01d14abdab Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Modra <amodra@gmail.com> | ||
3 | Date: Mon, 20 Jun 2022 10:39:31 +0930 | ||
4 | Subject: [PATCH] PR29262, memory leak in pr_function_type | ||
5 | |||
6 | PR 29262 | ||
7 | * prdbg.c (pr_function_type): Free "s" on failure path. | ||
8 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab] | ||
9 | CVE: CVE-2022-47010 | ||
10 | Signed-off-by: Virendra Thakur <virendrak@kpit.com> | ||
11 | Comment: Patch refreshed based on codebase. | ||
12 | --- | ||
13 | binutils/prdbg.c | 7 ++----- | ||
14 | 1 file changed, 2 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/binutils/prdbg.c b/binutils/prdbg.c | ||
17 | index c1e41628d26..bb42a5b6c2d 100644 | ||
18 | --- a/binutils/prdbg.c | ||
19 | +++ b/binutils/prdbg.c | ||
20 | @@ -778,12 +778,9 @@ | ||
21 | |||
22 | strcat (s, ")"); | ||
23 | |||
24 | - if (! substitute_type (info, s)) | ||
25 | - return FALSE; | ||
26 | - | ||
27 | + bfd_boolean ret = substitute_type (info, s); | ||
28 | free (s); | ||
29 | - | ||
30 | - return TRUE; | ||
31 | + return ret; | ||
32 | } | ||
33 | |||
34 | /* Turn the top type on the stack into a reference to that type. */ | ||