aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-01-29 13:09:01 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-01-29 13:09:01 +0000
commitd6f58b53513f647cc986dd027f6a0f23ac8ba152 (patch)
treea00f0689cd604bf32f3a87e59a9f349c1ac97c7e /ports-mgmt/pkg
parent5117bc9b7ef18e7c2f277feaeea4d4da9037e39d (diff)
downloadports-d6f58b53513f647cc986dd027f6a0f23ac8ba152.tar.gz
ports-d6f58b53513f647cc986dd027f6a0f23ac8ba152.zip
Import the libfetch patch to the bundled libfetch
Notes
Notes: svn path=/head/; revision=524543
Diffstat (limited to 'ports-mgmt/pkg')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-libfetch31
2 files changed, 32 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 2e0ea426cf6d..802621e0ab5a 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -3,6 +3,7 @@
PORTNAME= pkg
DISTVERSION= 1.12.0
_PKG_VERSION= ${DISTVERSION}
+PORTREVISION= 1
CATEGORIES= ports-mgmt
#MASTER_SITES= \
# http://files.etoilebsd.net/${PORTNAME}/ \
diff --git a/ports-mgmt/pkg/files/patch-libfetch b/ports-mgmt/pkg/files/patch-libfetch
new file mode 100644
index 000000000000..162a61b1a469
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-libfetch
@@ -0,0 +1,31 @@
+diff --git a/external/libfetch/fetch.c b/external/libfetch/fetch.c
+index 47c03a79..df5d5547 100644
+--- external/libfetch/fetch.c
++++ external/libfetch/fetch.c
+@@ -332,6 +332,8 @@ fetch_pctdecode(char *dst, const char *src, size_t dlen)
+ }
+ if (dlen-- > 0)
+ *dst++ = c;
++ else
++ return (NULL);
+ }
+ return (s);
+ }
+@@ -381,11 +383,15 @@ fetchParseURL(const char *URL)
+ if (p && *p == '@') {
+ /* username */
+ q = fetch_pctdecode(u->user, URL, URL_USERLEN);
++ if (q == NULL)
++ goto ouch;
+
+ /* password */
+- if (*q == ':')
++ if (*q == ':') {
+ q = fetch_pctdecode(u->pwd, q + 1, URL_PWDLEN);
+-
++ if (q == NULL)
++ goto ouch;
++ }
+ p++;
+ } else {
+ p = URL;