On 9/5/2013 12:49 PM, Gedare Bloom wrote:
If opts is NULL, then strchr() will dereference it and search for 's'.
Is this fixed in the upstream BSD source or do we need to report a bug?
1063863 Dereference after null check
---
cpukit/libfs/src/nfsclient/src/dirutils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpukit/libfs/src/nfsclient/src/dirutils.c
b/cpukit/libfs/src/nfsclient/src/dirutils.c
index 65e2053..d5fd1be 100644
--- a/cpukit/libfs/src/nfsclient/src/dirutils.c
+++ b/cpukit/libfs/src/nfsclient/src/dirutils.c
@@ -326,7 +326,7 @@ ln(char *to, char *name, char *opts)
}
name++;
}
- if (opts || strchr(opts,'s')) {
+ if (opts && strchr(opts,'s')) {
if (symlink(name,to)) {
fprintf(stderr,"symlink: %s\n",strerror(errno));
return -1;
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherr...@oarcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel