Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167661236
D49647.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
713 B
Referenced Files
None
Subscribers
None
D49647.diff
View Options
diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -319,14 +319,17 @@
ap->ap_initiator_portal = checked_strdup(portal);
mask = str = checked_strdup(portal);
net = strsep(&mask, "/");
- if (net[0] == '[')
+ if (net[0] == '[') {
net++;
- len = strlen(net);
- if (len == 0)
- goto error;
- if (net[len - 1] == ']')
+ len = strlen(net);
+ if (len < 2)
+ goto error;
+ if (net[len - 1] != ']')
+ goto error;
net[len - 1] = 0;
- if (strchr(net, ':') != NULL) {
+ } else if (net[0] == '\0')
+ goto error;
+ if (str[0] == '[' || strchr(net, ':') != NULL) {
struct sockaddr_in6 *sin6 =
(struct sockaddr_in6 *)&ap->ap_sa;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 3:15 PM (3 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37187873
Default Alt Text
D49647.diff (713 B)
Attached To
Mode
D49647: ctld: Tighten parsing of IPv6 addresses for initiator-portal
Attached
Detach File
Event Timeline
Log In to Comment