Hello community, here is the log from the commit of package sdcc for openSUSE:Factory checked in at 2014-12-03 22:48:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sdcc (Old) and /work/SRC/openSUSE:Factory/.sdcc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sdcc" Changes: -------- --- /work/SRC/openSUSE:Factory/sdcc/sdcc.changes 2014-08-03 07:50:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.sdcc.new/sdcc.changes 2014-12-03 22:49:22.000000000 +0100 @@ -1,0 +2,7 @@ +Sun Nov 30 11:21:26 UTC 2014 - w...@ire.pw.edu.pl + +- Fixed build for Tumbleweed and Factory by adding patch + sdcc-remove-strndup.patch +- added patch sdcc-libiberty.patch + +------------------------------------------------------------------- New: ---- sdcc-libiberty.patch sdcc-remove-strndup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sdcc.spec ++++++ --- /var/tmp/diff_new_pack.mtrzlV/_old 2014-12-03 22:49:23.000000000 +0100 +++ /var/tmp/diff_new_pack.mtrzlV/_new 2014-12-03 22:49:23.000000000 +0100 @@ -25,6 +25,8 @@ Url: http://sdcc.sourceforge.net/ Source: http://downloads.sourceforge.net/%{name}/%{name}-src-%{version}.tar.bz2 Source1: %{name}-rpmlintrc +Patch0: %{name}-remove-strndup.patch +Patch1: %{name}-libiberty.patch BuildRequires: bison BuildRequires: boost-devel BuildRequires: fdupes @@ -74,6 +76,10 @@ %prep %setup -q +%if 0%{?suse_version} > 1320 +%patch0 -p 1 -b .strndup +%endif +%patch1 -p 1 -b .libiberty # bnc#889723 rm support/regression/tests/bug3304184.c ++++++ sdcc-libiberty.patch ++++++ diff -up sdcc-3.4.0/support/sdbinutils/include/objalloc.h.libiberty sdcc-3.4.0/support/sdbinutils/include/objalloc.h --- sdcc-3.4.0/support/sdbinutils/include/objalloc.h.libiberty 2012-02-10 11:16:50.000000000 +0100 +++ sdcc-3.4.0/support/sdbinutils/include/objalloc.h 2014-11-22 15:13:08.000000000 +0100 @@ -91,7 +91,7 @@ extern void *_objalloc_alloc (struct obj if (__len == 0) \ __len = 1; \ __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \ - (__len <= __o->current_space \ + (__len != 0 && __len <= __o->current_space \ ? (__o->current_ptr += __len, \ __o->current_space -= __len, \ (void *) (__o->current_ptr - __len)) \ diff -up sdcc-3.4.0/support/sdbinutils/libiberty/objalloc.c.libiberty sdcc-3.4.0/support/sdbinutils/libiberty/objalloc.c --- sdcc-3.4.0/support/sdbinutils/libiberty/objalloc.c.libiberty 2012-02-10 11:16:50.000000000 +0100 +++ sdcc-3.4.0/support/sdbinutils/libiberty/objalloc.c 2014-11-22 15:13:08.000000000 +0100 @@ -112,8 +112,10 @@ objalloc_create (void) /* Allocate space from an objalloc structure. */ PTR -_objalloc_alloc (struct objalloc *o, unsigned long len) +_objalloc_alloc (struct objalloc *o, unsigned long original_len) { + unsigned long len = original_len; + /* We avoid confusion from zero sized objects by always allocating at least 1 byte. */ if (len == 0) @@ -121,6 +123,11 @@ _objalloc_alloc (struct objalloc *o, uns len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); + /* Check for overflow in the alignment operation above and the + malloc argument below. */ + if (len + CHUNK_HEADER_SIZE < original_len) + return NULL; + if (len <= o->current_space) { o->current_ptr += len; ++++++ sdcc-remove-strndup.patch ++++++ diff -up sdcc-3.4.0/sdas/linksrc/lkar.c.strndup sdcc-3.4.0/sdas/linksrc/lkar.c --- sdcc-3.4.0/sdas/linksrc/lkar.c.strndup 2011-12-04 00:42:25.000000000 +0100 +++ sdcc-3.4.0/sdas/linksrc/lkar.c 2014-11-15 10:15:49.000000000 +0100 @@ -45,7 +45,7 @@ along with this program. If not, see <h # define min(a,b) ((a) < (b) ? (a) : (b)) #endif - +/* char * strndup (const char *str, size_t len) { @@ -53,7 +53,7 @@ strndup (const char *str, size_t len) memcpy (s, str, len); s[len] = '\0'; return s; -} +} */ static int is_ar (FILE * libfp) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org