diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2008-04-26 00:03:17 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2008-04-26 00:03:17 +0000 |
commit | 2bd2aba6c9e6933beaf94c826e3c4ca6dc76a331 (patch) | |
tree | bdb8f39d08859ec98729a5b638047f1d2edc3f46 /c | |
parent | 5bb8ddf6b02773eeca613ad4ec96530a452ae438 (diff) |
2008-04-25 Till Straumann <strauman@slac.stanford.edu>
* nfsclient/Changelog.slac, nfsclient/src/nfs.c:
BUGFIX (PR#1284) -- possible memory corruption if
server connectivity is lost.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/nfsclient/ChangeLog.slac | 8 | ||||
-rw-r--r-- | c/src/nfsclient/src/nfs.c | 6 |
3 files changed, 20 insertions, 0 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog index b84dc2c76a..a625561259 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,3 +1,9 @@ +2008-04-25 Till Straumann <strauman@slac.stanford.edu> + + * nfsclient/Changelog.slac, nfsclient/src/nfs.c: + BUGFIX (PR#1284) -- possible memory corruption if + server connectivity is lost. + 2007-09-25 Joel Sherrill <joel.sherrill@OARcorp.com> * nfsclient/Makefile.am: Fix errors. diff --git a/c/src/nfsclient/ChangeLog.slac b/c/src/nfsclient/ChangeLog.slac index 94dea06763..dab9705bbe 100644 --- a/c/src/nfsclient/ChangeLog.slac +++ b/c/src/nfsclient/ChangeLog.slac @@ -1,3 +1,11 @@ +Changes since RTEMS-NFS 1.5: + - BUGFIX: path lookup ('evalpath') would erroneously return 0 (success) if + 1. server had been alive in the past + 2. server connectivity is lost + the bug, if triggered, caused memory + corruption. + (fixes PR#1284) + Changes since RTEMS-NFS 1.4: LICENSE: - changed license terms; RTEMS-NFS is now released under the more liberal diff --git a/c/src/nfsclient/src/nfs.c b/c/src/nfsclient/src/nfs.c index 2b5a04e36f..2ff879a070 100644 --- a/c/src/nfsclient/src/nfs.c +++ b/c/src/nfsclient/src/nfs.c @@ -929,6 +929,7 @@ NfsNode rval = nfsNodeCreate(node->nfs, 0); if (node->str) { rval->args.name = rval->str = strdup(node->str); if (!rval->str) { + errno = ENOMEM; nfsNodeDestroy(rval); return 0; } @@ -1393,6 +1394,11 @@ unsigned long niu,siu; /* clone the node */ if ( !node ) { /* nodeClone sets errno */ + pathloc->node_access = 0; + if ( ! (e = errno) ) { + /* if we have no node, e must not be zero! */ + e = ENOMEM; + } goto cleanup; } |