OOB patch, new upstream.

This commit is contained in:
Gwyn Ciesla 2019-02-12 09:21:48 -06:00
parent fe730d3511
commit c5e349fc14
4 changed files with 38 additions and 7 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/basedir.c b/src/basedir.c
index 68ab879..1a2a8c4 100644
--- a/src/basedir.c
+++ b/src/basedir.c
@@ -574,7 +574,7 @@ static char * xdgGetRelativeHome(const char *envname, const char *relativefallba
unsigned int homelen;
if (!(home = xdgGetEnv("HOME")))
return NULL;
- if (!(relhome = (char*)malloc((homelen = strlen(home))+fallbacklength))) return NULL;
+ if (!(relhome = (char*)malloc((homelen = strlen(home))+fallbacklength+1))) return NULL;
memcpy(relhome, home, homelen);
memcpy(relhome+homelen, relativefallback, fallbacklength+1);
}

View File

@ -0,0 +1,13 @@
diff --git a/tests/query-harness.sh b/tests/query-harness.sh
index bd6d55d..ac277fa 100644
--- a/tests/query-harness.sh
+++ b/tests/query-harness.sh
@@ -10,7 +10,7 @@ fi
testquery="${top_builddir}/tests/testquery"
if [ -n "$USE_VALGRIND" ] && (type valgrind 1>/dev/null)
then
- output="`valgrind -q --error-exitcode=1 "$testquery" $arguments`"
+ output="`valgrind -q --trace-children=yes --error-exitcode=1 "$testquery" $arguments`"
else
output="`"$testquery" $arguments`"
fi

View File

@ -1,13 +1,15 @@
Name: libxdg-basedir Name: libxdg-basedir
Version: 1.2.0 Version: 1.2.0
Release: 15%{?dist} Release: 16%{?dist}
Summary: Implementation of the XDG Base Directory Specifications Summary: Implementation of the XDG Base Directory Specifications
License: MIT License: MIT
URL: http://n.ethz.ch/student/nevillm/download/libxdg-basedir URL: https://github.com/devnev/libxdg-basedir
Source0: http://n.ethz.ch/student/nevillm/download/libxdg-basedir/%{name}-%{version}.tar.gz Source0: https://github.com/devnev/%{name}/archive/%{name}-%{version}.tar.gz
Patch0: libxdg-basedir-leak.patch Patch0: libxdg-basedir-leak.patch
Patch1: libxdg-basedir-valgrind-children.patch
Patch2: libxdg-basedir-basedir-bounds-error.patch
BuildRequires: valgrind
%description %description
The XDG Base Directory Specification defines where should user files The XDG Base Directory Specification defines where should user files
@ -57,8 +59,8 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
#%check %check
#make check make check USE_VALGRIND=1
%ldconfig_scriptlets %ldconfig_scriptlets
@ -75,6 +77,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%doc doc/html/ %doc doc/html/
%changelog %changelog
* Tue Feb 12 2019 Gwyn Ciesla <gwync@protonmail.com> - 1.2.0-16
- Relocated upstream, crash patch.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-15 * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
027aaf1495f6ffa4b5a563b511d5d3f3 libxdg-basedir-1.2.0.tar.gz SHA512 (libxdg-basedir-1.2.0.tar.gz) = b70f4fe7c155b9f9c8d9afab649ac009892b6c913fafe0b4e63b517bff35d028a43d715d8b636a2667904b74fa7b7b7666e5102b0675ca453982c3988cf1f652