[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6480] linux-user: don't crash with null name
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [6480] linux-user: don't crash with null name |
Date: |
Fri, 30 Jan 2009 19:48:07 +0000 |
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 <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6480] linux-user: don't crash with null name,
Aurelien Jarno <=