Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=0223bcdb9f902d8f664f56bcbb85dc9f1b1da375
commit 0223bcdb9f902d8f664f56bcbb85dc9f1b1da375 Author: DeX77 <[email protected]> Date: Thu Feb 2 13:58:30 2017 +0100 iniparser-4.0-2-x86_64 * fix alloc errors diff --git a/source/lib-extra/iniparser/0001-allocate-memory-for-string-termination.patch b/source/lib-extra/iniparser/0001-allocate-memory-for-string-termination.patch new file mode 100644 index 0000000..bc0d44c --- /dev/null +++ b/source/lib-extra/iniparser/0001-allocate-memory-for-string-termination.patch @@ -0,0 +1,26 @@ +From 3d385e4f2aba5122d9e40481c4aec9135b96428a Mon Sep 17 00:00:00 2001 +From: Christian Hesse <[email protected]> +Date: Thu, 21 May 2015 10:07:32 +0200 +Subject: [PATCH] allocate memory for string termination + +This fixes invalid write. +--- + src/iniparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/iniparser.c b/src/iniparser.c +index 1eb1004..c8a728e 100644 +--- a/src/iniparser.c ++++ b/src/iniparser.c +@@ -66,7 +66,7 @@ static const char * strlwc(const char * in, char *out, unsigned len) + /*--------------------------------------------------------------------------*/ + static char * _strdup(const char *s) + { +- char * copy = (char*) malloc(strlen(s)); ++ char * copy = (char*) malloc(strlen(s) + 1); + strcpy(copy, s); + return copy ; + } +-- +2.4.5 + diff --git a/source/lib-extra/iniparser/FrugalBuild b/source/lib-extra/iniparser/FrugalBuild index 851a4f0..faea5ad 100644 --- a/source/lib-extra/iniparser/FrugalBuild +++ b/source/lib-extra/iniparser/FrugalBuild @@ -3,7 +3,7 @@ pkgname=iniparser pkgver=4.0 -pkgrel=1 +pkgrel=2 pkgdesc="A free stand-alone ini file parsing library written in portable ANSI C" url="http://ndevilla.free.fr/iniparser" depends=('glibc') @@ -12,10 +12,13 @@ archs=('x86_64') _F_github_author="ndevilla" _F_github_tag_v=y Finclude github -sha1sums=('7cff339bb67eac060b5cf436759859266c336507') +source=("${source[@]}" 0001-allocate-memory-for-string-termination.patch) +sha1sums=('7cff339bb67eac060b5cf436759859266c336507' \ + 'cb55c25810106da67bc0b56f2e6fde001f4e6323') build() { Fcd + Fpatchall Fmake Ffilerel src/iniparser.h /usr/include/iniparser.h Ffilerel src/dictionary.h /usr/include/dictionary.h _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
