diff options
author | Gedare Bloom <gedare@rtems.org> | 2013-09-05 13:44:04 -0400 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2013-09-05 13:44:04 -0400 |
commit | c963ac7e39412434998ca4480df7615beb20d872 (patch) | |
tree | fd411ed67e65f102698488ceba032e325b5c3791 /cpukit/libfs/src/nfsclient | |
parent | bdpart: Argument cannot be negative (diff) | |
download | rtems-c963ac7e39412434998ca4480df7615beb20d872.tar.bz2 |
nfs: Fix ln option processing.
If opts is NULL, then strchr() will dereference it and search for 's'.
1063863 Dereference after null check
Diffstat (limited to 'cpukit/libfs/src/nfsclient')
-rw-r--r-- | 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 65e2053ddc..d5fd1be131 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; |