summaryrefslogtreecommitdiff
path: root/time/remind/patches
diff options
context:
space:
mode:
authorkim <kim@pkgsrc.org>2004-11-24 23:04:41 +0000
committerkim <kim@pkgsrc.org>2004-11-24 23:04:41 +0000
commit6219bfd4e5eba3c90647c3ea5b52eaabae9eae21 (patch)
tree9a34ccdcc1c7736fd0a096464d1dc0e5f83a5ae0 /time/remind/patches
parent8c3ae0e67442803e796d74c9a64b0399100ca63f (diff)
downloadpkgsrc-6219bfd4e5eba3c90647c3ea5b52eaabae9eae21.tar.gz
Fixed the globbing in patch-ac (thanks Christos), to avoid errors from free.
Closes PR pkg/26612
Diffstat (limited to 'time/remind/patches')
-rw-r--r--time/remind/patches/patch-ac15
1 files changed, 8 insertions, 7 deletions
diff --git a/time/remind/patches/patch-ac b/time/remind/patches/patch-ac
index e8885d990e7..7d9ea97aa36 100644
--- a/time/remind/patches/patch-ac
+++ b/time/remind/patches/patch-ac
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/12/17 23:32:11 wiz Exp $
+$NetBSD: patch-ac,v 1.2 2004/11/24 23:04:41 kim Exp $
---- src/files.c.orig Mon Apr 5 13:34:48 1999
-+++ src/files.c Wed Mar 1 19:48:52 2000
+--- src/files.c.orig 2000-02-17 22:45:54.000000000 -0500
++++ src/files.c 2004-11-24 18:01:56.000000000 -0500
@@ -19,6 +19,7 @@
#include <string.h>
@@ -10,11 +10,12 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/17 23:32:11 wiz Exp $
#include <sys/stat.h>
#ifdef TM_IN_SYS_TIME
-@@ -421,16 +422,26 @@
+@@ -421,16 +422,27 @@
{
DynamicBuffer buf;
int r, e;
+ glob_t g;
++ char **gp;
DBufInit(&buf);
+ memset(&g, 0, sizeof(g));
@@ -30,12 +31,12 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/17 23:32:11 wiz Exp $
+ glob(DBufValue(&buf), GLOB_NOCHECK|GLOB_BRACE|GLOB_TILDE, NULL, &g);
DBufFree(&buf);
+
-+ do {
-+ if ( (r=IncludeFile(*g.gl_pathv)) ) {
++ for (gp = g.gl_pathv; gp && *gp; gp++) {
++ if ( (r=IncludeFile(*gp)) ) {
+ globfree(&g);
+ return r;
+ }
-+ } while (*++g.gl_pathv != NULL);
++ }
+
+ globfree(&g);
NumIfs = 0;