Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146613944
D13746.id38524.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
679 B
Referenced Files
None
Subscribers
None
D13746.id38524.diff
View Options
Index: head/sys/geom/label/g_label.c
===================================================================
--- head/sys/geom/label/g_label.c
+++ head/sys/geom/label/g_label.c
@@ -200,6 +200,7 @@
struct g_provider *pp2;
struct g_consumer *cp;
char name[64];
+ int n;
g_topology_assert();
@@ -213,7 +214,12 @@
}
gp = NULL;
cp = NULL;
- snprintf(name, sizeof(name), "%s/%s", dir, label);
+ n = snprintf(name, sizeof(name), "%s/%s", dir, label);
+ if (n >= sizeof(name)) {
+ if (req != NULL)
+ gctl_error(req, "Label name %s is too long.", label);
+ return (NULL);
+ }
LIST_FOREACH(gp, &mp->geom, geom) {
pp2 = LIST_FIRST(&gp->provider);
if (pp2 == NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 2:59 AM (13 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29268193
Default Alt Text
D13746.id38524.diff (679 B)
Attached To
Mode
D13746: Don't truncate name of label, just report that is invalid.
Attached
Detach File
Event Timeline
Log In to Comment