Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177329613
D40199.1794140464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
934 B
Referenced Files
None
Subscribers
None
D40199.1794140464.diff
View Options
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -428,14 +428,17 @@
free(tobesorted);
}
- if (getenv("PATH_FSTAB") != NULL)
- fstab_path = getenv("PATH_FSTAB");
- else
+ fstab_path = getenv("PATH_FSTAB");
+ if (fstab_path == NULL)
fstab_path = "/etc/fstab";
fstab = fopen(fstab_path, "w+");
if (fstab == NULL) {
- sprintf(message, "Cannot open fstab file %s for writing (%s)\n",
- getenv("PATH_FSTAB"), strerror(errno));
+ error = snprintf(message, sizeof(message), "Cannot open fstab file %s"
+ " for writing (%s)\n", fstab_path, strerror(errno));
+ if (error < 0) {
+ snprintf(message, sizeof(message), "Cannot open fstab file for"
+ " writing (%s)\n", strerror(errno));
+ }
conf.title = "Error";
bsddialog_msgbox(&conf, message, 0, 0);
return (-1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 12:21 PM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41585273
Default Alt Text
D40199.1794140464.diff (934 B)
Attached To
Mode
D40199: Fix CID 1011162. Unbounded src buf /usr.sbin/bsdinstall/partedit/partedit.c
Attached
Detach File
Event Timeline