projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
fdde71b
)
Fix home-dir crash
author
H.G. Muller
<h.g.muller@hccnet.nl>
Mon, 15 Nov 2010 10:36:21 +0000 (11:36 +0100)
committer
Arun Persaud
<arun@nubati.net>
Thu, 18 Nov 2010 07:06:44 +0000 (23:06 -0800)
When confronted with a path name starting with ~ and not containing a /
XBoard would segfault.
xboard.c
patch
|
blob
|
history
diff --git
a/xboard.c
b/xboard.c
index
2e8a773
..
3050105
100644
(file)
--- a/
xboard.c
+++ b/
xboard.c
@@
-7621,7
+7621,7
@@
ExpandPathName(path)
}
else {
safeStrCpy(buf, s+1, sizeof(buf)/sizeof(buf[0]) );
- *strchr(buf, '/') = 0;
+ { char *p; if(p = strchr(buf, '/')) *p = 0; }
pwd = getpwnam(buf);
if (!pwd)
{