diff --git a/srcpkgs/iniparser/patches/fix-malloc_size.patch b/srcpkgs/iniparser/patches/fix-malloc_size.patch new file mode 100644 index 00000000000..9d4425b8be6 --- /dev/null +++ b/srcpkgs/iniparser/patches/fix-malloc_size.patch @@ -0,0 +1,16 @@ +--- src/iniparser.c ++++ src/iniparser.c +@@ -66,7 +66,8 @@ 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); ++ if (copy) +- strcpy(copy, s); ++ strcpy(copy, s); + return copy ; + } +-- +2.4.5 + diff --git a/srcpkgs/iniparser/template b/srcpkgs/iniparser/template index 2c861ab385c..8749145e28b 100644 --- a/srcpkgs/iniparser/template +++ b/srcpkgs/iniparser/template @@ -1,7 +1,7 @@ # Template file for 'iniparser' pkgname=iniparser version=4.0 -revision=2 +revision=3 build_style=gnu-makefile hostmakedepends="doxygen chrpath" short_desc="A free stand-alone ini file parsing library"