SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
23
x11/gnome/terminal/patches/patch-src_terminal-util_cc
Normal file
23
x11/gnome/terminal/patches/patch-src_terminal-util_cc
Normal file
|
@ -0,0 +1,23 @@
|
|||
Use strcspn(3) instead of non-portable strchrnul(3).
|
||||
|
||||
Index: src/terminal-util.cc
|
||||
--- src/terminal-util.cc.orig
|
||||
+++ src/terminal-util.cc
|
||||
@@ -1181,7 +1181,7 @@ char *terminal_util_hyperlink_uri_label (const char *u
|
||||
g_ascii_strncasecmp(unesc, "https://", 8) == 0) {
|
||||
gs_free char *unidn = nullptr;
|
||||
char *hostname = strchr(unesc, '/') + 2;
|
||||
- char *hostname_end = strchrnul(hostname, '/');
|
||||
+ char *hostname_end = hostname + strcspn(hostname, "/");
|
||||
char save = *hostname_end;
|
||||
*hostname_end = '\0';
|
||||
unidn = g_hostname_to_unicode(hostname);
|
||||
@@ -1526,7 +1526,7 @@ terminal_util_find_program_in_path (const char *path,
|
||||
char *startp;
|
||||
|
||||
path = p;
|
||||
- p = strchrnul (path, G_SEARCHPATH_SEPARATOR);
|
||||
+ p = path + strcspn (path, G_SEARCHPATH_SEPARATOR_S);
|
||||
|
||||
if (p == path)
|
||||
/* Two adjacent colons, or a colon at the beginning or the end
|
Loading…
Add table
Add a link
Reference in a new issue