Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ucl for openSUSE:Factory checked in at 2022-09-02 21:56:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ucl (Old) and /work/SRC/openSUSE:Factory/.ucl.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ucl" Fri Sep 2 21:56:46 2022 rev:5 rq:1000844 version:1.03 Changes: -------- --- /work/SRC/openSUSE:Factory/ucl/ucl.changes 2020-01-25 13:24:18.160040304 +0100 +++ /work/SRC/openSUSE:Factory/.ucl.new.2083/ucl.changes 2022-09-02 21:57:09.328385425 +0200 @@ -1,0 +2,28 @@ +Wed Aug 31 19:39:05 UTC 2022 - Antoine Belvire <antoine.belv...@opensuse.org> + +- Remove upx-207.patch not mentioned in spec file as patch: + Replaced by 05-Fix-double-free.patch. +- Start patch list at index 0. + +------------------------------------------------------------------- +Mon Jun 27 02:18:55 UTC 2022 - Cristian Rodr??guez <crrodrig...@opensuse.org> + +- Import debian patch sets. This fixes some bugs and + allows us to build the library without any special CFLAGS: + * ucl-noexecstack.patch + * 01-Examples.patch + * 02-Autoreconf.patch + * 03-Reproducible-build.patch + * 04-Static-assert.patch + * 05-Fix-double-free.patch + * 06-Fix-memory-errors.patch + * 07-Fix-FTBFS-on-x32.patch + * 08-Asm-build-flags.patch + +------------------------------------------------------------------- +Sun Jun 26 01:15:00 UTC 2022 - Cristian Rodr??guez <crrodrig...@opensuse.org> + +- Add ucl-noexecstack.patch: Fix FTBS on i586 due to executable + stack + +------------------------------------------------------------------- Old: ---- upx-207.patch New: ---- 01-Examples.patch 02-Autoreconf.patch 03-Reproducible-build.patch 04-Static-assert.patch 05-Fix-double-free.patch 06-Fix-memory-errors.patch 07-Fix-FTBFS-on-x32.patch 08-Asm-build-flags.patch ucl-noexecstack.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ucl.spec ++++++ --- /var/tmp/diff_new_pack.Y7Aeoh/_old 2022-09-02 21:57:09.928386877 +0200 +++ /var/tmp/diff_new_pack.Y7Aeoh/_new 2022-09-02 21:57:09.932386887 +0200 @@ -1,7 +1,7 @@ # # spec file for package ucl # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,15 @@ Group: Development/Libraries/C and C++ URL: https://www.oberhumer.com/opensource/ucl/ Source0: http://www.oberhumer.com/opensource/ucl/download/ucl-%{version}.tar.gz -Patch1: upx-207.patch +Patch0: ucl-noexecstack.patch +Patch1: 01-Examples.patch +Patch2: 02-Autoreconf.patch +Patch3: 03-Reproducible-build.patch +Patch4: 04-Static-assert.patch +Patch5: 05-Fix-double-free.patch +Patch6: 06-Fix-memory-errors.patch +Patch7: 07-Fix-FTBFS-on-x32.patch +Patch8: 08-Asm-build-flags.patch BuildRequires: gcc-c++ %description @@ -57,8 +65,6 @@ %autosetup -p1 %build -export CFLAGS="%{optflags} -std=c90" -export CXXFLAGS="%{optflags} -std=c90" %configure \ --disable-static \ --enable-shared ++++++ 01-Examples.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Mon, 26 Jul 2004 20:44:00 +0200 Subject: 01 Examples. Fix examples. --- examples/portab.h | 2 +- examples/simple.c | 2 +- examples/uclpack.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/portab.h b/examples/portab.h index 6cf0752..719839c 100644 --- a/examples/portab.h +++ b/examples/portab.h @@ -28,7 +28,7 @@ #include <ucl/uclconf.h> -#if 1 +#if 0 #include "examples/portab_a.h" diff --git a/examples/simple.c b/examples/simple.c index 5fd54be..faecf60 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -32,7 +32,7 @@ /* portability layer */ #define WANT_UCL_MALLOC 1 -#include "examples/portab.h" +#include "portab.h" /************************************************************************* diff --git a/examples/uclpack.c b/examples/uclpack.c index a340c24..a104876 100644 --- a/examples/uclpack.c +++ b/examples/uclpack.c @@ -60,7 +60,7 @@ #define WANT_UCL_UCLOCK 1 #endif #define WANT_UCL_WILDARGV 1 -#include "examples/portab.h" +#include "portab.h" static const char *progname = NULL; ++++++ 02-Autoreconf.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Wed, 21 May 2014 23:23:49 +0200 Subject: 02 Autoreconf Fix autoconf files to make it possible to call autoreconf, see bug #744671. The acc[123].m4 files were extracted from the original aclocal.m4 file. --- Makefile.am | 2 + configure.ac | 4 +- examples/Makefile.am | 2 +- m4/acc1.m4 | 97 ++++++++++++++++++++++++++++++++++ m4/acc2.m4 | 42 +++++++++++++++ m4/acc3.m4 | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 5 +- 7 files changed, 290 insertions(+), 5 deletions(-) create mode 100644 m4/acc1.m4 create mode 100644 m4/acc2.m4 create mode 100644 m4/acc3.m4 diff --git a/Makefile.am b/Makefile.am index 3570c33..f615f27 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,8 @@ AUTOMAKE_OPTIONS = 1.8.5 foreign +ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = include src examples dist-hook: diff --git a/configure.ac b/configure.ac index 16adb1d..96ffde0 100644 --- a/configure.ac +++ b/configure.ac @@ -47,8 +47,10 @@ AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_MAINTAINER_MODE +AC_CONFIG_MACRO_DIR([m4]) + if test -z "$ac_abs_top_srcdir"; then - _AC_SRCPATHS(.) + _AC_SRCDIRS(.) fi if test -r .Conf.settings1; then . ./.Conf.settings1 diff --git a/examples/Makefile.am b/examples/Makefile.am index 4f1be03..bd33c6a 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -3,7 +3,7 @@ # Copyright (C) 1996-2004 Markus F.X.J. Oberhumer # -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) noinst_PROGRAMS = simple uclpack diff --git a/m4/acc1.m4 b/m4/acc1.m4 new file mode 100644 index 0000000..d1ccb5b --- /dev/null +++ b/m4/acc1.m4 @@ -0,0 +1,97 @@ +# serial 1 + +# /*********************************************************************** +# // standard ACC macros +# ************************************************************************/ + +AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ +AC_C_BIGENDIAN([AC_DEFINE(ACC_ENDIAN_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ENDIAN_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) +])# + +AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ +AC_HEADER_TIME +AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h]) +])# + +AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ +AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) +])# + + +AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) + +AC_CHECK_SIZEOF(ptrdiff_t) +AC_CHECK_SIZEOF(size_t) +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(char *) + +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(unsigned long long) +AC_CHECK_SIZEOF(__int64) +AC_CHECK_SIZEOF(unsigned __int64) +])# + + +# /*********************************************************************** +# // Check for ACC_conformance +# ************************************************************************/ + +AC_DEFUN([mfx_ACC_ACCCHK], [ +mfx_tmp=$1 +mfx_save_CPPFLAGS=$CPPFLAGS +dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here +test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" + +AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#define ACC_CONFIG_NO_HEADER 1 +#include "acc/acc.h" +#include "acc/acc_incd.h" +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) +#include "acc/acc_chk.ch" +#undef ACCCHK_ASSERT +static void test_acc_compile_time_assert(void) { +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) +#include "acc/acc_chk.ch" +#undef ACCCHK_ASSERT +} +#undef NDEBUG +#include <assert.h> +static int test_acc_run_time_assert(int r) { +#define ACCCHK_ASSERT(expr) assert(expr); +#include "acc/acc_chk.ch" +#undef ACCCHK_ASSERT +return r; +} +]], [[ +test_acc_compile_time_assert(); +if (test_acc_run_time_assert(1) != 1) return 1; +]] +)]) + +mfx_tmp=FAILED +_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) +rm -f conftest.$ac_ext conftest.$ac_objext + +CPPFLAGS=$mfx_save_CPPFLAGS + +AC_MSG_RESULT([$mfx_tmp]) +case x$mfx_tmp in + xpassed | xyes) ;; + *) + AC_MSG_NOTICE([]) + AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) + AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) + AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) + AC_MSG_NOTICE([Thanks for your support.]) + AC_MSG_NOTICE([]) + AC_MSG_ERROR([ACC conformance test failed. Stop.]) +dnl AS_EXIT + ;; +esac +])# mfx_ACC_ACCCHK diff --git a/m4/acc2.m4 b/m4/acc2.m4 new file mode 100644 index 0000000..f0ce59b --- /dev/null +++ b/m4/acc2.m4 @@ -0,0 +1,42 @@ +# serial 1 + +AC_DEFUN([mfx_PROG_CPPFLAGS], [ +AC_MSG_CHECKING([whether the C preprocessor needs special flags]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# include "your C preprocessor is broken 1" +#elif (0xffffu == 0xfffffffful) +# include "your C preprocessor is broken 2" +#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) +# include "your C preprocessor is broken 3" +#endif +]], [[ ]] +)]) + +mfx_save_CPPFLAGS=$CPPFLAGS +mfx_tmp=ERROR +for mfx_arg in "" -no-cpp-precomp +do + CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" + _AC_COMPILE_IFELSE([], +[mfx_tmp=$mfx_arg +break]) +done +CPPFLAGS=$mfx_save_CPPFLAGS +rm -f conftest.$ac_ext conftest.$ac_objext +case x$mfx_tmp in + x) + AC_MSG_RESULT([none needed]) ;; + xERROR) + AC_MSG_RESULT([ERROR]) + AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) + ;; + *) + AC_MSG_RESULT([$mfx_tmp]) + CPPFLAGS="$mfx_tmp $CPPFLAGS" + ;; +esac +])# mfx_PROG_CPPFLAGS + diff --git a/m4/acc3.m4 b/m4/acc3.m4 new file mode 100644 index 0000000..a6ff628 --- /dev/null +++ b/m4/acc3.m4 @@ -0,0 +1,143 @@ +# serial 3 + +AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ +AC_CACHE_CHECK([whether limits.h is sane], +mfx_cv_header_sane_limits_h, +[AC_TRY_COMPILE([#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# if defined(__APPLE__) && defined(__GNUC__) +# error "your preprocessor is broken - use compiler option -no-cpp-precomp" +# else +# include "your preprocessor is broken" +# endif +#endif +#define MFX_0xffff 0xffff +#define MFX_0xffffffffL 4294967295ul +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# include "error CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) +# include "error UCHAR_MAX 1" +#endif +#if !defined(USHRT_MAX) +# include "error USHRT_MAX 1" +#endif +#if !defined(UINT_MAX) +# include "error UINT_MAX 1" +#endif +#if !defined(ULONG_MAX) +# include "error ULONG_MAX 1" +#endif +#if !defined(SHRT_MAX) +# include "error SHRT_MAX 1" +#endif +#if !defined(INT_MAX) +# include "error INT_MAX 1" +#endif +#if !defined(LONG_MAX) +# include "error LONG_MAX 1" +#endif +#if (UCHAR_MAX < 1) +# include "error UCHAR_MAX 2" +#endif +#if (USHRT_MAX < 1) +# include "error USHRT_MAX 2" +#endif +#if (UINT_MAX < 1) +# include "error UINT_MAX 2" +#endif +#if (ULONG_MAX < 1) +# include "error ULONG_MAX 2" +#endif +#if (UCHAR_MAX < 0xff) +# include "error UCHAR_MAX 3" +#endif +#if (USHRT_MAX < MFX_0xffff) +# include "error USHRT_MAX 3" +#endif +#if (UINT_MAX < MFX_0xffff) +# include "error UINT_MAX 3" +#endif +#if (ULONG_MAX < MFX_0xffffffffL) +# include "error ULONG_MAX 3" +#endif +#if (USHRT_MAX > UINT_MAX) +# include "error USHRT_MAX vs UINT_MAX" +#endif +#if (UINT_MAX > ULONG_MAX) +# include "error UINT_MAX vs ULONG_MAX" +#endif +],[ +#if (USHRT_MAX == MFX_0xffff) +{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } +#elif (USHRT_MAX >= MFX_0xffff) +{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } +#endif +#if (UINT_MAX == MFX_0xffff) +{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } +#elif (UINT_MAX >= MFX_0xffff) +{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } +#endif +#if (ULONG_MAX == MFX_0xffff) +{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } +#elif (ULONG_MAX >= MFX_0xffff) +{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } +#endif +#if (USHRT_MAX == MFX_0xffffffffL) +{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } +#elif (USHRT_MAX >= MFX_0xffffffffL) +{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } +#endif +#if (UINT_MAX == MFX_0xffffffffL) +{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } +#elif (UINT_MAX >= MFX_0xffffffffL) +{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } +#endif +#if (ULONG_MAX == MFX_0xffffffffL) +{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } +#elif (ULONG_MAX >= MFX_0xffffffffL) +{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } +#endif +], +mfx_cv_header_sane_limits_h=yes, +mfx_cv_header_sane_limits_h=no)]) +]) + +# /*********************************************************************** +# // +# ************************************************************************/ + +dnl more types which are not yet covered by ACC + +AC_DEFUN([mfx_CHECK_SIZEOF], [ +AC_CHECK_SIZEOF(__int32) +AC_CHECK_SIZEOF(unsigned __int32) +AC_CHECK_SIZEOF(intmax_t) +AC_CHECK_SIZEOF(uintmax_t) +AC_CHECK_SIZEOF(intptr_t) +AC_CHECK_SIZEOF(uintptr_t) + +AC_CHECK_SIZEOF(float) +AC_CHECK_SIZEOF(double) +AC_CHECK_SIZEOF(long double) + +AC_CHECK_SIZEOF(dev_t) +AC_CHECK_SIZEOF(fpos_t) +AC_CHECK_SIZEOF(mode_t) +AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(ssize_t) +AC_CHECK_SIZEOF(time_t) +])# + + + +AC_DEFUN([mfx_CHECK_LIB_WINMM], [ +if test "X$GCC" = Xyes; then +case $host_os in +cygwin* | mingw* | pw32*) + LIBS="$LIBS -lwinmm" ;; +*) + ;; +esac +fi +])# diff --git a/src/Makefile.am b/src/Makefile.am index 78d0e51..bdb99a0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,9 +6,8 @@ VPATH = @srcdir@@UCL_ASM_VPATH@ SUFFIXES = .S -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) -CPPFLAGS = $(UCL_CPPFLAGS) $(configure_CPPFLAGS) $(UCL_EXTRA_CPPFLAGS) -CFLAGS = $(UCL_CFLAGS) $(configure_CFLAGS) $(UCL_EXTRA_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) $(UCL_CPPFLAGS) $(configure_CPPFLAGS) $(UCL_EXTRA_CPPFLAGS) +AM_CFLAGS = $(UCL_CFLAGS) $(configure_CFLAGS) $(UCL_EXTRA_CFLAGS) lib_LTLIBRARIES = libucl.la ++++++ 03-Reproducible-build.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Sun, 31 May 2015 13:09:15 +0200 Subject: 03 Reproducible build Introduced BUILD_DATETIME pre-processor variable to be used instead of __DATE__ __TIME__ to make build reproducible. --- src/ucl_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ucl_util.c b/src/ucl_util.c index 7e49a2a..58aa0ea 100644 --- a/src/ucl_util.c +++ b/src/ucl_util.c @@ -55,7 +55,11 @@ static const char __ucl_copyright[] = "<mar...@oberhumer.com>\n" "http://www.oberhumer.com $\n\n" "$Id: UCL version: v" UCL_VERSION_STRING ", " UCL_VERSION_DATE " $\n" +#if defined (BUILD_DATETIME) + "$Built: " BUILD_DATETIME " $\n" +#else "$Built: " __DATE__ " " __TIME__ " $\n" +#endif "$Info: " ACC_INFO_OS #if defined(ACC_INFO_OS_POSIX) "/" ACC_INFO_OS_POSIX ++++++ 04-Static-assert.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Sat, 2 Jul 2016 22:23:20 +0200 Subject: Switch to _Static_assert Use _Static_assert for compile-time assertion to fix build failures with gcc-6 (closes: #811707) --- acc/acc_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acc/acc_defs.h b/acc/acc_defs.h index 866b7bd..5ee3761 100644 --- a/acc/acc_defs.h +++ b/acc/acc_defs.h @@ -87,6 +87,9 @@ /* This can be put into a header file but may get ignored by some compilers. */ #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e); +#endif +#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) @@ -100,6 +103,9 @@ /* This must appear within a function body. */ #if !defined(ACC_COMPILE_TIME_ASSERT) +# define ACC_COMPILE_TIME_ASSERT(e) _Static_assert(e, #e); +#endif +#if !defined(ACC_COMPILE_TIME_ASSERT) # if (ACC_CC_AZTECC) # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];} # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) ++++++ 05-Fix-double-free.patch ++++++ From: John Reiser <jrei...@users.sourceforge.net> Date: Mon, 27 Aug 2018 20:32:39 +0200 Subject: Fix double free (memory clobbered) bug visible in upx Patch from https://github.com/upx/upx/issues/207 to fix a crash in upx occurring on malformed input. The "m_len + 1" in fail(olen + (m_len + 1) > oend, UCL_E_OUTPUT_OVERRUN); should match the "m_len + 1" in olen += m_len + 1; because it is the number of increments of olen in the copy step: dst[olen++] = *m_pos++; do dst[olen++] = *m_pos++; while (--m_len > 0); Bugs-Debian: https://bugs.debian.org/907426 --- src/n2b_d.c | 2 +- src/n2e_d.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/n2b_d.c b/src/n2b_d.c index 26b6ca5..2725c59 100644 --- a/src/n2b_d.c +++ b/src/n2b_d.c @@ -101,7 +101,7 @@ m_len += 2; } m_len += (m_off > 0xd00); - fail(olen + m_len > oend, UCL_E_OUTPUT_OVERRUN); + fail(olen + m_len + 1> oend, UCL_E_OUTPUT_OVERRUN); fail(m_off > olen, UCL_E_LOOKBEHIND_OVERRUN); #ifdef TEST_OVERLAP olen += m_len + 1; diff --git a/src/n2e_d.c b/src/n2e_d.c index efddb49..d40059d 100644 --- a/src/n2e_d.c +++ b/src/n2e_d.c @@ -109,7 +109,7 @@ m_len += 3; } m_len += (m_off > 0x500); - fail(olen + m_len > oend, UCL_E_OUTPUT_OVERRUN); + fail(olen + m_len + 1> oend, UCL_E_OUTPUT_OVERRUN); fail(m_off > olen, UCL_E_LOOKBEHIND_OVERRUN); #ifdef TEST_OVERLAP olen += m_len + 1; ++++++ 06-Fix-memory-errors.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Wed, 29 Aug 2018 12:37:32 +0200 Subject: Fix memory errors shown by valgrind Initialize memory in two places in ucl_swd.ch to get rid of memory errors detected by valgrind in a test program included in the bug report. Bugs-Debian: https://bugs.debian.org/804474 --- src/ucl_swd.ch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ucl_swd.ch b/src/ucl_swd.ch index abc0ae1..575d4de 100644 --- a/src/ucl_swd.ch +++ b/src/ucl_swd.ch @@ -330,7 +330,7 @@ int swd_init(ucl_swd_t *s, const ucl_bytep dict, ucl_uint dict_len) else s->rp += s->b_size - s->node_count; -#if defined(__UCL_CHECKER) +#if 1 /*defined(__UCL_CHECKER)*/ /* initialize memory for the first few HEAD3 (if s->ip is not far * enough ahead to do this job for us). The value doesn't matter. */ if (s->look < 3) @@ -377,7 +377,7 @@ void swd_getbyte(ucl_swd_t *s) { if (s->look > 0) --s->look; -#if defined(__UCL_CHECKER) +#if 1 /*defined(__UCL_CHECKER)*/ /* initialize memory - value doesn't matter */ s->b[s->ip] = 0; if (s->ip < s->f) ++++++ 07-Fix-FTBFS-on-x32.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Sat, 1 Sep 2018 09:12:11 +0200 Subject: Fix x32 compilation Check for __IPL32__ together with __x86_64__ as documented in https://wiki.debian.org/X32Port to fix compilation on x32 architecture. --- acc/acc_arch.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acc/acc_arch.h b/acc/acc_arch.h index 8f83583..caeca81 100644 --- a/acc/acc_arch.h +++ b/acc/acc_arch.h @@ -41,6 +41,9 @@ #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) # define ACC_ARCH_IA16 1 # define ACC_INFO_ARCH "ia16" +#elif defined(__ILP32__) && defined(__x86_64__) +# define ACC_ARCH_IA32 1 +# define ACC_INFO_ARCH "x32" #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) # define ACC_ARCH_AMD64 1 # define ACC_INFO_ARCH "amd64" ++++++ 08-Asm-build-flags.patch ++++++ From: Robert Luberda <rob...@debian.org> Date: Mon, 11 Jan 2021 08:45:08 +0100 Subject: Pass C*FLAGS while compiling assembly Make build log checker happy by passing CPPFLAGS and CFLAGS to gcc calls that compile assembly code. --- src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index bdb99a0..043b8af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,10 +56,10 @@ UCL_ASM_OBJECTS = \ n2e_d_s1.lo n2e_d_s2.lo n2e_d_s3.lo n2e_d_s4.lo n2e_d_s5.lo n2e_d_s6.lo .S.o: - $(CC) -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< .S.lo: - $(LIBTOOL) --mode=compile $(CC) -c $< + $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< endif ++++++ ucl-noexecstack.patch ++++++ Index: ucl-1.03/asm/i386/src_gas/asminit.def =================================================================== --- ucl-1.03.orig/asm/i386/src_gas/asminit.def +++ ucl-1.03/asm/i386/src_gas/asminit.def @@ -48,5 +48,7 @@ #ifndef db # define db .byte #endif - +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif .text