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.
This commit is contained in:
Till Straumann
2008-04-26 00:03:17 +00:00
parent 5bb8ddf6b0
commit 2bd2aba6c9
3 changed files with 20 additions and 0 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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;
}