svn commit: r524544 - in branches/2020Q1/ports-mgmt/pkg: . files
Baptiste Daroussin
bapt at FreeBSD.org
Wed Jan 29 13:10:15 UTC 2020
Author: bapt
Date: Wed Jan 29 13:10:14 2020
New Revision: 524544
URL: https://svnweb.freebsd.org/changeset/ports/524544
Log:
MFH: r524543
Import the libfetch patch to the bundled libfetch
Approved by: portmgr (implicit)
Added:
branches/2020Q1/ports-mgmt/pkg/files/patch-libfetch
- copied unchanged from r524543, head/ports-mgmt/pkg/files/patch-libfetch
Modified:
branches/2020Q1/ports-mgmt/pkg/Makefile
Directory Properties:
branches/2020Q1/ (props changed)
Modified: branches/2020Q1/ports-mgmt/pkg/Makefile
==============================================================================
--- branches/2020Q1/ports-mgmt/pkg/Makefile Wed Jan 29 13:09:01 2020 (r524543)
+++ branches/2020Q1/ports-mgmt/pkg/Makefile Wed Jan 29 13:10:14 2020 (r524544)
@@ -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}/ \
Copied: branches/2020Q1/ports-mgmt/pkg/files/patch-libfetch (from r524543, head/ports-mgmt/pkg/files/patch-libfetch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2020Q1/ports-mgmt/pkg/files/patch-libfetch Wed Jan 29 13:10:14 2020 (r524544, copy of r524543, head/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;
More information about the svn-ports-all
mailing list