projects
/
hachu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
96cced9
)
Fix crash on reading some FENs
author
H.G.Muller
<hgm@hgm-xboard.(none)>
Mon, 2 Jun 2014 17:34:47 +0000 (19:34 +0200)
committer
H.G.Muller
<hgm@hgm-xboard.(none)>
Mon, 2 Jun 2014 17:34:47 +0000 (19:34 +0200)
It was possible to read beyond the end of a FEN when converting it to
internal format, which could lead to all kind of nastiness.
hachu.c
patch
|
blob
|
history
diff --git
a/hachu.c
b/hachu.c
index
711ec43
..
0eea758
100644
(file)
--- a/
hachu.c
+++ b/
hachu.c
@@
-2318,6
+2318,7
@@
Convert (char *fen)
*p++ = table[2* (*fen - 'A' - n)+1] + n;
\r
}
\r
} else *p++ = *fen;
\r
+ if(!*fen) break;
\r
fen++;
\r
}
\r
printf("# converted FEN '%s'\n", fenArray);
\r