Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/libunistring-0.9.9.tar.xz
|
SOURCES/libunistring-0.9.10.tar.xz
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
0f7049cf9cdea9d010235cf6c56254693da17eaa SOURCES/libunistring-0.9.9.tar.xz
|
16dc423d3ebd23f365b0ffe7d584428b427f4bde SOURCES/libunistring-0.9.10.tar.xz
|
||||||
|
|||||||
85
SOURCES/fix-memory-leak-in-vasnprintf.patch
Normal file
85
SOURCES/fix-memory-leak-in-vasnprintf.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
diff -ru libunistring-0.9.10/lib/vasnprintf.c libunistring-0.9.10.new/lib/vasnprintf.c
|
||||||
|
--- libunistring-0.9.10/lib/vasnprintf.c 2018-05-25 18:02:16.000000000 +0200
|
||||||
|
+++ libunistring-0.9.10.new/lib/vasnprintf.c 2021-06-14 17:06:43.084948649 +0200
|
||||||
|
@@ -1864,7 +1864,7 @@
|
||||||
|
|
||||||
|
/* Ensures that allocated >= needed. Aborts through a jump to
|
||||||
|
out_of_memory if needed is SIZE_MAX or otherwise too big. */
|
||||||
|
-#define ENSURE_ALLOCATION(needed) \
|
||||||
|
+#define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \
|
||||||
|
if ((needed) > allocated) \
|
||||||
|
{ \
|
||||||
|
size_t memory_size; \
|
||||||
|
@@ -1875,17 +1875,19 @@
|
||||||
|
allocated = (needed); \
|
||||||
|
memory_size = xtimes (allocated, sizeof (DCHAR_T)); \
|
||||||
|
if (size_overflow_p (memory_size)) \
|
||||||
|
- goto out_of_memory; \
|
||||||
|
+ oom_statement \
|
||||||
|
if (result == resultbuf || result == NULL) \
|
||||||
|
memory = (DCHAR_T *) malloc (memory_size); \
|
||||||
|
else \
|
||||||
|
memory = (DCHAR_T *) realloc (result, memory_size); \
|
||||||
|
if (memory == NULL) \
|
||||||
|
- goto out_of_memory; \
|
||||||
|
+ oom_statement \
|
||||||
|
if (result == resultbuf && length > 0) \
|
||||||
|
DCHAR_CPY (memory, result, length); \
|
||||||
|
result = memory; \
|
||||||
|
}
|
||||||
|
+#define ENSURE_ALLOCATION(needed) \
|
||||||
|
+ ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; )
|
||||||
|
|
||||||
|
for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
|
||||||
|
{
|
||||||
|
@@ -2137,7 +2139,8 @@
|
||||||
|
}
|
||||||
|
if (converted != result + length)
|
||||||
|
{
|
||||||
|
- ENSURE_ALLOCATION (xsum (length, converted_len));
|
||||||
|
+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
|
||||||
|
+ { free (converted); goto out_of_memory; });
|
||||||
|
DCHAR_CPY (result + length, converted, converted_len);
|
||||||
|
free (converted);
|
||||||
|
}
|
||||||
|
@@ -2263,7 +2266,8 @@
|
||||||
|
}
|
||||||
|
if (converted != result + length)
|
||||||
|
{
|
||||||
|
- ENSURE_ALLOCATION (xsum (length, converted_len));
|
||||||
|
+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
|
||||||
|
+ { free (converted); goto out_of_memory; });
|
||||||
|
DCHAR_CPY (result + length, converted, converted_len);
|
||||||
|
free (converted);
|
||||||
|
}
|
||||||
|
@@ -2389,7 +2393,8 @@
|
||||||
|
}
|
||||||
|
if (converted != result + length)
|
||||||
|
{
|
||||||
|
- ENSURE_ALLOCATION (xsum (length, converted_len));
|
||||||
|
+ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
|
||||||
|
+ { free (converted); goto out_of_memory; });
|
||||||
|
DCHAR_CPY (result + length, converted, converted_len);
|
||||||
|
free (converted);
|
||||||
|
}
|
||||||
|
@@ -2914,7 +2919,8 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
- ENSURE_ALLOCATION (xsum (length, tmpdst_len));
|
||||||
|
+ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
|
||||||
|
+ { free (tmpdst); goto out_of_memory; });
|
||||||
|
DCHAR_CPY (result + length, tmpdst, tmpdst_len);
|
||||||
|
free (tmpdst);
|
||||||
|
length += tmpdst_len;
|
||||||
|
@@ -5368,7 +5374,8 @@
|
||||||
|
errno = saved_errno;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
- ENSURE_ALLOCATION (xsum (length, tmpdst_len));
|
||||||
|
+ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
|
||||||
|
+ { free (tmpdst); goto out_of_memory; });
|
||||||
|
DCHAR_CPY (result + length, tmpdst, tmpdst_len);
|
||||||
|
free (tmpdst);
|
||||||
|
count = tmpdst_len;
|
||||||
|
libunistring-0.9.10.new/lib のみに存在: vasnprintf.c.orig
|
||||||
@ -1,75 +0,0 @@
|
|||||||
diff -ru libunistring-0.9.9.orig/lib/fseterr.c libunistring-0.9.9/lib/fseterr.c
|
|
||||||
--- libunistring-0.9.9.orig/lib/fseterr.c 2018-02-28 17:07:03.000000000 +0100
|
|
||||||
+++ libunistring-0.9.9/lib/fseterr.c 2018-08-15 16:40:53.419266090 +0200
|
|
||||||
@@ -1,20 +1,11 @@
|
|
||||||
/* Set the error indicator of a stream.
|
|
||||||
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
- This program is free software: you can redistribute it and/or
|
|
||||||
- modify it under the terms of either:
|
|
||||||
+ This program is free software: you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
|
|
||||||
- * the GNU Lesser General Public License as published by the Free
|
|
||||||
- Software Foundation; either version 3 of the License, or (at your
|
|
||||||
- option) any later version.
|
|
||||||
-
|
|
||||||
- or
|
|
||||||
-
|
|
||||||
- * the GNU General Public License as published by the Free
|
|
||||||
- Software Foundation; either version 2 of the License, or (at your
|
|
||||||
- option) any later version.
|
|
||||||
-
|
|
||||||
- or both in parallel, as here.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
@@ -32,13 +23,17 @@
|
|
||||||
|
|
||||||
#include "stdio-impl.h"
|
|
||||||
|
|
||||||
+/* This file is not used on systems that have the __fseterr function,
|
|
||||||
+ namely musl libc. */
|
|
||||||
+
|
|
||||||
void
|
|
||||||
fseterr (FILE *fp)
|
|
||||||
{
|
|
||||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
|
||||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
|
||||||
fast macros. */
|
|
||||||
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
|
|
||||||
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
|
|
||||||
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
|
|
||||||
fp->_flags |= _IO_ERR_SEEN;
|
|
||||||
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
|
|
||||||
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
|
|
||||||
diff -ru libunistring-0.9.9.orig/lib/fseterr.h libunistring-0.9.9/lib/fseterr.h
|
|
||||||
--- libunistring-0.9.9.orig/lib/fseterr.h 2018-02-28 17:07:03.000000000 +0100
|
|
||||||
+++ libunistring-0.9.9/lib/fseterr.h 2018-08-15 16:40:53.419266090 +0200
|
|
||||||
@@ -1,20 +1,11 @@
|
|
||||||
/* Set the error indicator of a stream.
|
|
||||||
Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
- This program is free software: you can redistribute it and/or
|
|
||||||
- modify it under the terms of either:
|
|
||||||
+ This program is free software: you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
|
|
||||||
- * the GNU Lesser General Public License as published by the Free
|
|
||||||
- Software Foundation; either version 3 of the License, or (at your
|
|
||||||
- option) any later version.
|
|
||||||
-
|
|
||||||
- or
|
|
||||||
-
|
|
||||||
- * the GNU General Public License as published by the Free
|
|
||||||
- Software Foundation; either version 2 of the License, or (at your
|
|
||||||
- option) any later version.
|
|
||||||
-
|
|
||||||
- or both in parallel, as here.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
@ -1,15 +1,14 @@
|
|||||||
# This spec file has been automatically updated
|
# This spec file has been automatically updated
|
||||||
Version: 0.9.9
|
Version: 0.9.10
|
||||||
Release: 3%{?dist}
|
Release: 15%{?dist}
|
||||||
Name: libunistring
|
Name: libunistring
|
||||||
Group: System Environment/Libraries
|
|
||||||
Summary: GNU Unicode string library
|
Summary: GNU Unicode string library
|
||||||
License: GPLv2+ or LGPLv3+
|
License: GPLv2+ or LGPLv3+
|
||||||
Url: http://www.gnu.org/software/libunistring/
|
URL: https://www.gnu.org/software/libunistring/
|
||||||
Source0: http://ftp.gnu.org/gnu/libunistring/%{name}-%{version}.tar.xz
|
Source0: https://ftp.gnu.org/gnu/libunistring/%{name}-%{version}.tar.xz
|
||||||
Patch0: fseterr-update-20180815.patch
|
Patch0: fix-memory-leak-in-vasnprintf.patch
|
||||||
Requires(post): info
|
BuildRequires: gcc
|
||||||
Requires(preun): info
|
BuildRequires: make
|
||||||
Provides: bundled(gnulib)
|
Provides: bundled(gnulib)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -20,36 +19,33 @@ This portable C library implements Unicode string types in three flavours:
|
|||||||
case folding and regular expressions).
|
case folding and regular expressions).
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Group: Development/Libraries
|
|
||||||
Summary: GNU Unicode string library - development files
|
Summary: GNU Unicode string library - development files
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development files for programs using libunistring.
|
Development files for programs using libunistring.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .fseterr-update
|
%patch0 -p1 -b .fix-memory-leak-in-vasnprintf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --disable-rpath
|
%configure --disable-static --disable-rpath
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
%make_install
|
||||||
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}.la
|
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.la
|
||||||
# Move staged docs so not picked up by %%doc in main package
|
# Move staged docs so not picked up by %%doc in main package
|
||||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} __doc
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} __doc
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%license COPYING COPYING.LIB
|
%license COPYING COPYING.LIB
|
||||||
%doc AUTHORS NEWS README
|
%doc AUTHORS NEWS README
|
||||||
%{_libdir}/%{name}.so.*
|
%{_libdir}/%{name}.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc HACKING DEPENDENCIES THANKS ChangeLog
|
%doc HACKING DEPENDENCIES THANKS ChangeLog
|
||||||
%doc __doc/*
|
%doc __doc/*
|
||||||
%{_infodir}/%{name}.info*
|
%{_infodir}/%{name}.info*
|
||||||
@ -59,22 +55,54 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} __doc
|
|||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%post devel
|
|
||||||
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
||||||
|
|
||||||
%preun devel
|
|
||||||
if [ $1 = 0 ]; then
|
|
||||||
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Aug 17 2018 Mike FABIAN <mfabian@redhat.com> - 0.9.9-3
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.10-15
|
||||||
- Fix invalid license tag
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
- Resolves: rhbz#1611728
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Wed Aug 15 2018 Mike FABIAN <mfabian@redhat.com> - 0.9.9-2
|
* Mon Jun 21 2021 Mike FABIAN <mfabian@redhat.com> - 0.9.10-14
|
||||||
- update fseterr from current gnulib to make it build on RHEL-8
|
- Related rhbz#1938800: Fix CI tests and convert them to tmt
|
||||||
- Resolves: rhbz#1611728
|
|
||||||
|
* Mon Jun 14 2021 Mike FABIAN <mfabian@redhat.com> - 0.9.10-13
|
||||||
|
- Related rhbz#1938800: Fix spelling in license GPLV2+ -> GPLv2+
|
||||||
|
|
||||||
|
* Mon Jun 14 2021 Mike FABIAN <mfabian@redhat.com> - 0.9.10-12
|
||||||
|
- Fix memory leak in vasnprint. Resolves: rhbz#1938800
|
||||||
|
(Backported from upstream: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4d288a80bf7ebe29334b9805cdcc70eacb6059c1)
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.10-11
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 0.9.10-8
|
||||||
|
- Use make macros
|
||||||
|
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 0.9.10-4
|
||||||
|
- Rebuild with fixed binutils
|
||||||
|
|
||||||
|
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.9.10-3
|
||||||
|
- Replace obsolete scriptlets
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 28 2018 Daiki Ueno <dueno@redhat.com> - 0.9.10-1
|
||||||
|
- Update to upstream 0.9.10 release
|
||||||
|
|
||||||
* Thu Mar 01 2018 Daiki Ueno <dueno@redhat.com> - 0.9.9-1
|
* Thu Mar 01 2018 Daiki Ueno <dueno@redhat.com> - 0.9.9-1
|
||||||
- Update to upstream 0.9.9 release
|
- Update to upstream 0.9.9 release
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user