Accepting request 621385 from home:bmwiedemann:reproducible:test

Add bash-memmove.patch to make bash.html build reproducible (boo#1100488)

OBS-URL: https://build.opensuse.org/request/show/621385
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=266
This commit is contained in:
Dr. Werner Fink 2018-07-10 09:59:35 +00:00 committed by Git OBS Bridge
parent ced73c8702
commit 9215244af1
3 changed files with 26 additions and 0 deletions

19
bash-memmove.patch Normal file
View File

@ -0,0 +1,19 @@
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2018-07-07
strcpy can cause corruption when working on overlapping strings
so we use memmove instead that handles this case correctly
Index: bash-4.4/support/man2html.c
===================================================================
--- bash-4.4.orig/support/man2html.c
+++ bash-4.4/support/man2html.c
@@ -1992,7 +1993,7 @@ unescape (char *c)
while (i < l && c[i]) {
if (c[i] == '\a') {
if (c[i+1])
- strcpy(c + i, c + i + 1); /* should be memmove */
+ memmove(c + i, c + i + 1, strlen(c + i));
else {
c[i] = '\0';
break;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Jul 7 05:03:48 UTC 2018 - bwiedemann@suse.com
- Add bash-memmove.patch to make bash.html build reproducible (boo#1100488)
-------------------------------------------------------------------
Mon Jun 4 09:21:15 UTC 2018 - werner@suse.de

View File

@ -83,6 +83,7 @@ Patch47: bash-4.3-perl522.patch
Patch48: bash-4.3-extra-import-func.patch
# PATCH-EXTEND-SUSE Allow root to clean file system if filled up
Patch49: bash-4.3-pathtemp.patch
Patch50: bash-memmove.patch
%global _sysconfdir /etc
%global _incdir %{_includedir}
%global _ldldir /%{_lib}/bash
@ -225,6 +226,7 @@ done
%endif
%patch49 -p0 -b .pthtmp
%patch0 -p0 -b .0
%patch50 -p1
# This has to be always the same version as included in the bash its self
rl1=($(sed -rn '/RL_READLINE_VERSION/p' lib/readline/readline.h))
rl2=($(sed -rn '/RL_READLINE_VERSION/p' /usr/include/readline/readline.h))