From 4be1418d1423f5fe07633ceed0855bc276be5e6a Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 8 Aug 2022 13:07:28 -0600 Subject: [PATCH] Add -ensure-6x patch (rhbz#2115476). --- clisp-ensure-6x.patch | 11 +++++++++++ clisp.spec | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 clisp-ensure-6x.patch diff --git a/clisp-ensure-6x.patch b/clisp-ensure-6x.patch new file mode 100644 index 0000000..5c9207d --- /dev/null +++ b/clisp-ensure-6x.patch @@ -0,0 +1,11 @@ +--- modules/syscalls/calls.c.orig 2021-06-28 14:32:42.000000000 -0600 ++++ modules/syscalls/calls.c 2022-08-04 13:21:10.461997402 -0600 +@@ -677,7 +677,7 @@ DEFUN(OS:VERSION>=, string1 string2){VAL + && name[name##_bytelen-6]=='X') { \ + c_template = name; \ + } else { \ +- c_template = (char*)alloca(name##_bytelen+6); \ ++ c_template = (char*)alloca(name##_bytelen+7); \ + strcpy(c_template,name); \ + strcat(c_template,"XXXXXX"); \ + } diff --git a/clisp.spec b/clisp.spec index 05338ec..984e5b7 100644 --- a/clisp.spec +++ b/clisp.spec @@ -16,7 +16,7 @@ Version: 2.49.93 %forgemeta -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv2+ URL: http://www.clisp.org/ Source0: %{forgesource} @@ -41,6 +41,10 @@ Patch4: %{name}-pts-access.patch # Work around a problem inlining a function on ppc64le # See https://bugzilla.redhat.com/show_bug.cgi?id=2049371 Patch5: %{name}-no-inline.patch +# The ENSURE_6X macro adds 6 'X' characters to a string. However, it allocates +# only 6 bytes more than the length of the string, which is not enough for the +# null terminator. See https://bugzilla.redhat.com/show_bug.cgi?id=2115476. +Patch6: %{name}-ensure-6x.patch BuildRequires: dbus-devel BuildRequires: diffutils @@ -122,6 +126,7 @@ Files necessary for linking CLISP programs. %ifarch %{power64} %patch5 -p0 %endif +%patch6 -p0 cp -p %{SOURCE1} emacs cp -p %{SOURCE2} %{SOURCE3} src/po @@ -430,6 +435,9 @@ make -C build base-mod-check %changelog +* Mon Aug 8 2022 Jerry James - 2.49.93-25 +- Add -ensure-6x patch (rhbz#2115476) + * Wed Jul 20 2022 Fedora Release Engineering - 2.49.93-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild