* [Qemu-devel] [6480] linux-user: don't crash with null name
@ 2009-01-30 19:48 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2009-01-30 19:48 UTC (permalink / raw)
To: qemu-devel
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
>From Thayne Harbaugh.
path() may be called with null string, don't bother trying to
remap in that case.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/linux-user/path.c
Modified: trunk/linux-user/path.c
===================================================================
--- trunk/linux-user/path.c 2009-01-30 19:47:57 UTC (rev 6479)
+++ trunk/linux-user/path.c 2009-01-30 19:48:07 UTC (rev 6480)
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-30 19:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30 19:48 [Qemu-devel] [6480] linux-user: don't crash with null name Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).