Bump Buildroot Version to buildroot 2019_02_6
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 75e147d0ab85262d9bb2fff093db7ce67dbd4b62 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Wed, 6 Mar 2019 19:56:54 +0100
|
||||
Subject: [PATCH] libelf: Fix possible resource leak in elf[32|64]_updatefile.
|
||||
|
||||
When we cannot allocate enough memory to convert the data in
|
||||
updatemmap we should free the scns before returning an error.
|
||||
|
||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||
[Retrieved (and slightly updated to remove ChangeLog update) from:
|
||||
https://sourceware.org/git/?p=elfutils.git;a=patch;h=75e147d0ab85262d9bb2fff093db7ce67dbd4b62]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
libelf/elf32_updatefile.c | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
* gelf_xlate.c (__elf_xfctstof): Remove alias.
|
||||
diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c
|
||||
index 2899c6f..457d18e 100644
|
||||
--- a/libelf/elf32_updatefile.c
|
||||
+++ b/libelf/elf32_updatefile.c
|
||||
@@ -365,6 +365,7 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum)
|
||||
char *converted = aligned_alloc (align, size);
|
||||
if (converted == NULL)
|
||||
{
|
||||
+ free (scns);
|
||||
__libelf_seterrno (ELF_E_NOMEM);
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From 6bd060a23f43a842fbc37dd1bb8d6d7964eda36e Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Thu, 7 Mar 2019 17:31:53 +0100
|
||||
Subject: [PATCH] libelf: Use posix_memalign instead of aligned_alloc.
|
||||
|
||||
Older glibc might not have aligned_alloc (it is C11).
|
||||
Use posix_memalign instead. posix_memalign requires the alignment to
|
||||
be a multiple of sizeof (void *). So use malloc for smaller alignments.
|
||||
|
||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||
[Retrieved (and slighlty updated to remove ChangeLog update) from:
|
||||
https://sourceware.org/git/?p=elfutils.git;a=patch;h=6bd060a23f43a842fbc37dd1bb8d6d7964eda36e]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
libelf/elf32_updatefile.c | 20 +++++++++++++++++---
|
||||
2 files changed, 22 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c
|
||||
index 457d18e..eea51a7 100644
|
||||
--- a/libelf/elf32_updatefile.c
|
||||
+++ b/libelf/elf32_updatefile.c
|
||||
@@ -360,16 +360,30 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum)
|
||||
else
|
||||
{
|
||||
/* We have to do the conversion on properly
|
||||
- aligned memory first. */
|
||||
+ aligned memory first. align is a power of 2,
|
||||
+ but posix_memalign only works for alignments
|
||||
+ which are a multiple of sizeof (void *).
|
||||
+ So use normal malloc for smaller alignments. */
|
||||
size_t size = dl->data.d.d_size;
|
||||
- char *converted = aligned_alloc (align, size);
|
||||
+ void *converted;
|
||||
+ if (align < sizeof (void *))
|
||||
+ converted = malloc (size);
|
||||
+ else
|
||||
+ {
|
||||
+ int res;
|
||||
+ res = posix_memalign (&converted, align, size);
|
||||
+ if (res != 0)
|
||||
+ converted = NULL;
|
||||
+ }
|
||||
+
|
||||
if (converted == NULL)
|
||||
{
|
||||
free (scns);
|
||||
__libelf_seterrno (ELF_E_NOMEM);
|
||||
return 1;
|
||||
}
|
||||
- (*fctp) (converted, dl->data.d.d_buf, size, 1);
|
||||
+
|
||||
+ (*fctp) (converted, dl->data.d.d_buf, size, 1);
|
||||
|
||||
/* And then write it to the mmapped file. */
|
||||
memcpy (last_position, converted, size);
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From https://sourceware.org/elfutils/ftp/0.174/sha512.sum
|
||||
sha512 696708309c2a9a076099748809ecdc0490f4a8a842b2efc1aae0d746e7c5a8b203743f5626739eff837216b0c052696516b2821f5d3cc3f2eef86597c96d42df elfutils-0.174.tar.bz2
|
||||
# From https://sourceware.org/elfutils/ftp/0.176/sha512.sum
|
||||
sha512 7f032913be363a43229ded85d495dcf7542b3c85974aaaba0d984228dc9ac1721da3dc388d3fa02325a80940161db7e9ad2c9e4521a424ad8a7d050c0902915b elfutils-0.176.tar.bz2
|
||||
# Locally calculated
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING-GPLV2
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ELFUTILS_VERSION = 0.174
|
||||
ELFUTILS_VERSION = 0.176
|
||||
ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2
|
||||
ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION)
|
||||
ELFUTILS_INSTALL_STAGING = YES
|
||||
|
||||
Reference in New Issue
Block a user