Actions
Bug #6261
closedFix for 6198 overlooked NULL abuse in svr4pkg/libinst/mntinfo.c
Status:
Closed
Priority:
Low
Assignee:
-
Category:
nfs - NFS server and client
Start date:
2015-09-24
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
Richard PALO pointed this additional change that he'd have liked to have seen (slightly modified for correctness) in #6198 :
diff --git a/usr/src/cmd/svr4pkg/libinst/mntinfo.c b/usr/src/cmd/svr4pkg/libinst/mntinfo.c index 0867628..44fda5c 100644 --- a/usr/src/cmd/svr4pkg/libinst/mntinfo.c +++ b/usr/src/cmd/svr4pkg/libinst/mntinfo.c @@ -223,7 +223,7 @@ get_server_host(uint32_t n) if (n < fs_tab_used) { (void) strcpy(hostname, fs_tab[n]->remote_name); if ((host_end = strchr(hostname, ':')) == NULL) { - if ((strcmp(fs_tab[n]->fstype, MNTTYPE_AUTOFS)) == NULL) + if ((strcmp(fs_tab[n]->fstype, MNTTYPE_AUTOFS)) == 0) return ("automounter"); else return (fs_tab[n]->fstype); @@ -1121,7 +1121,7 @@ fsys(char *path) * do the string compare. -- JST */ if ((fs_namelen == 1 && *(fs_tab[i]->name) == '/') || - ((term_char == '/' || term_char == NULL) && + ((term_char == '/' || term_char == '\0') && strncmp(fs_tab[i]->name, path2use, fs_namelen) == 0)) { return (i); }
This would make a good bite-sized introduction for someone new to illumos, modulo the possibility svr4pkg isn't removed first.
Related issues
Updated by Dan McDonald over 6 years ago
- Related to Bug #6198: Let's EOL cachefs added
Updated by Richard PALO over 6 years ago
Thanks, Dan. This is part of merge hell with new/modified bugs on top of 5218...
Updated by Toomas Soome over 1 year ago
- Related to Bug #11435: svr4pkg: NULL pointer errors added
Updated by Toomas Soome over 1 year ago
- Related to Feature #12661: null.h: enable NULL pointer for SPARC added
Actions