diff options
author | tte_zheng_wenlong <wenlong_zheng_za@mail.toyota.co.jp> | 2016-10-20 16:17:50 +0900 |
---|---|---|
committer | tte_zheng_wenlong <wenlong_zheng_za@mail.toyota.co.jp> | 2016-11-02 17:22:04 +0900 |
commit | 2c595497e43fadd83ea155f632ba69a31fe923fa (patch) | |
tree | fb95e43c8bff0f65da10a43204501181503ab486 /meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch | |
parent | f25d5b743034c65add42639148ff16563a62b044 (diff) |
Add software packages for oem needs library
These recipes is support software packages for oem needs.
The librarys include:
boost, fixesproto, imagemagick, iptables, Xorg-macros
zlib, eglibc(glibc), libcurl, libgif, libneon, mongoose
fuse, protocol buffers, bsdiff, module-init-tools
libcroco, libtiff, librsvg, libpcap, libtar
You can add these librarys by feature 'agl-oem-extra-libs'
source meta-agl/scripts/aglsetup.sh -m porter agl-demo [agl-appfw-smack] [agl-devel] [agl-netboot] agl-oem-extra-libs
v2[jsmoeller]:
- change to ImageMagick recipe (generalize configure append and add dependency)
- readd libtar with tarball taken from debian as original git is n/a
v3[tte_zheng_wenlong]
- add libtar and libtar-dev in packagegroup-ivi-common-core-os-commonlibs.bbappend
- modify README.md to explain build command.
v4[tte_zheng_wenlong]
- modify mongoose license from GPLv2 to MIT.
- delete [] for agl-oem-extra-libs for README.md
Change-Id: I1f9d2f1c023f332d528918c3f730ee0360a1f497
Signed-off-by: tte_zheng_wenlong <wenlong_zheng_za@mail.toyota.co.jp>
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch')
-rw-r--r-- | meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch b/meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch new file mode 100644 index 00000000..548d7518 --- /dev/null +++ b/meta-oem-extra-libs/recipes-core/libtar/files/no_static_buffers.patch @@ -0,0 +1,82 @@ +From: Kamil Dudka <kdudka@redhat.com> +Date: Wed, 23 Oct 2013 13:04:22 +0000 (+0200) +Origin: http://repo.or.cz/w/libtar.git/commitdiff/ec613af2e9371d7a3e1f7c7a6822164a4255b4d1 +Subject: decode: avoid using a static buffer in th_get_pathname() + +decode: avoid using a static buffer in th_get_pathname() + +A solution suggested by Chris Frey: +https://lists.feep.net:8080/pipermail/libtar/2013-October/000377.html + +Note this can break programs that expect sizeof(TAR) to be fixed. + +--- a/lib/decode.c ++++ b/lib/decode.c +@@ -13,6 +13,7 @@ + #include <internal.h> + + #include <stdio.h> ++#include <stdlib.h> + #include <sys/param.h> + #include <pwd.h> + #include <grp.h> +@@ -26,20 +27,30 @@ + char * + th_get_pathname(TAR *t) + { +- static TLS_THREAD char filename[MAXPATHLEN]; +- + if (t->th_buf.gnu_longname) + return t->th_buf.gnu_longname; + +- if (t->th_buf.prefix[0] != '\0') ++ /* allocate the th_pathname buffer if not already */ ++ if (t->th_pathname == NULL) ++ { ++ t->th_pathname = malloc(MAXPATHLEN * sizeof(char)); ++ if (t->th_pathname == NULL) ++ /* out of memory */ ++ return NULL; ++ } ++ ++ if (t->th_buf.prefix[0] == '\0') ++ { ++ snprintf(t->th_pathname, MAXPATHLEN, "%.100s", t->th_buf.name); ++ } ++ else + { +- snprintf(filename, sizeof(filename), "%.155s/%.100s", ++ snprintf(t->th_pathname, MAXPATHLEN, "%.155s/%.100s", + t->th_buf.prefix, t->th_buf.name); +- return filename; + } + +- snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name); +- return filename; ++ /* will be deallocated in tar_close() */ ++ return t->th_pathname; + } + + +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -121,6 +121,7 @@ tar_close(TAR *t) + libtar_hash_free(t->h, ((t->oflags & O_ACCMODE) == O_RDONLY + ? free + : (libtar_freefunc_t)tar_dev_free)); ++ free(t->th_pathname); + free(t); + + return i; +--- a/lib/libtar.h ++++ b/lib/libtar.h +@@ -85,6 +85,9 @@ typedef struct + int options; + struct tar_header th_buf; + libtar_hash_t *h; ++ ++ /* introduced in libtar 1.2.21 */ ++ char *th_pathname; + } + TAR; + |