[6480] linux-user: don't crash with null name
Revision: 6480
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6480 Author: aurel32 Date: 2009-01-30 19:48:07 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
linux-user: don't crash with null name
Quoted 1 line
From Thayne Harbaugh.
path() may be called with null string, don't bother trying to remap in that case.
Signed-off-by Riku Voipio <[email protected]>
Signed-off-by Aurelien Jarno <[email protected]>
Modified Paths:
--------------
trunk/linux-user/path.c
Modified: trunk/linux-user/path.c
===================================================================
linux-user/path.c +1 -1
@@ -152,7 +152,7 @@ {/* Only do absolute paths: quick and dirty, but should mostly be OK. Could do relative by tracking cwd. */ -if (!base || name[0 ] !='/' ) +if (!base || !name || name[0 ] !='/' )return name;return follow_path (base, name) ?: name;