summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-04-14 12:08:51 -0700
committerMichael Forney <mforney@mforney.org>2017-04-14 12:23:06 -0700
commit42568142cd2ae0322e92c348f366108792fc8571 (patch)
tree8b4895b698e691d8083808fba32468e5b22e5f51 /pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch
parent91ef3a50dc331e4aae80ff8821e026bf914cf470 (diff)
openbsd: Update to 6.1
Diffstat (limited to 'pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch')
-rw-r--r--pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch19
1 files changed, 9 insertions, 10 deletions
diff --git a/pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch b/pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch
index fb3e7cbd..acf95b95 100644
--- a/pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch
+++ b/pkg/openbsd/patch/0001-fts-Avoid-d_namlen.patch
@@ -1,17 +1,17 @@
-From 03bc025e5ccfc5ba5524cd76a83a5682263fd3e4 Mon Sep 17 00:00:00 2001
+From b546a0ae0beb2323143aed00d05e2fdf4fef5239 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 17 Apr 2016 23:50:15 -0700
Subject: [PATCH] fts: Avoid d_namlen
---
- lib/libc/gen/fts.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
+ lib/libc/gen/fts.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
-index 9a9b2a5..77e1e77 100644
+index 98b3a0a39..c186b7af2 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
-@@ -556,6 +556,7 @@ fts_build(FTS *sp, int type)
+@@ -555,6 +555,7 @@ fts_build(FTS *sp, int type)
int nitems, cderrno, descend, level, nlinks, nostat, doadjust;
int saved_errno;
char *cp;
@@ -19,13 +19,12 @@ index 9a9b2a5..77e1e77 100644
/* Set current node pointer. */
cur = sp->fts_cur;
-@@ -654,11 +655,13 @@ fts_build(FTS *sp, int type)
+@@ -653,11 +654,12 @@ fts_build(FTS *sp, int type)
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
continue;
-- if (!(p = fts_alloc(sp, dp->d_name, (size_t)dp->d_namlen)))
+- if (!(p = fts_alloc(sp, dp->d_name, dp->d_namlen)))
+ namlen = strlen(dp->d_name);
-+
+ if (!(p = fts_alloc(sp, dp->d_name, namlen)))
goto mem1;
- if (dp->d_namlen >= maxlen) { /* include space for NUL */
@@ -36,7 +35,7 @@ index 9a9b2a5..77e1e77 100644
/*
* No more memory for path or structures. Save
* errno, free up the current structure and the
-@@ -684,7 +687,7 @@ mem1: saved_errno = errno;
+@@ -683,7 +685,7 @@ mem1: saved_errno = errno;
p->fts_level = level;
p->fts_parent = sp->fts_cur;
@@ -46,5 +45,5 @@ index 9a9b2a5..77e1e77 100644
/*
* If we wrap, free up the current structure and
--
-2.9.3
+2.12.2