Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151982721
D45147.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
661 B
Referenced Files
None
Subscribers
None
D45147.id.diff
View Options
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -1164,8 +1164,14 @@
f = RB_FIND(files_t, &ftree,
&(struct file){ .xf_data =
p->socket });
- pos += xprintf("[%lu %d]",
- (u_long)f->xf_pid, f->xf_fd);
+ if (__predict_false(f == NULL))
+ /* Known to happen when a dgram
+ * socket is open in the kernel,
+ * gssd.sock for example */
+ pos += xprintf("??");
+ else
+ pos += xprintf("[%lu %d]",
+ (u_long)f->xf_pid, f->xf_fd);
} else
pos += printaddr(&p->laddr->address);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 10:24 PM (8 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31376026
Default Alt Text
D45147.id.diff (661 B)
Attached To
Mode
D45147: sockstat: Fix segfault when peer has no pid
Attached
Detach File
Event Timeline
Log In to Comment