Files
Stockfish/src
Marco Costalba 5df7d62eb9 Fix 'position ..... moves ' parsing bug
If after 'moves' there is a space then we crash.

The problem is that operator>>() trims whitespaces so that
after 'moves' has been extract we are still not at eof()
but remaining string contains only spaces. So that the next
extarction operation uip >> token ends up with unchanged token
value that remains 'moves', this garbage value is then feeded
to RootPosition.do_move() through move_from_string() that does
not detect the invalid move value leading to a crash.

This bug is triggered by Shredder 12 interface under Mac that
puts a space after 'moves' without any actual move list.

Bug fixed by Justin Blanchard

After reviewing UCI parsing code I spotted other possible weak
points due to the fact that we don't test if the last extract
operation has been succesful. So I have extended Justing patch
to fix the remaining possible holes in uci.cpp

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2010-02-01 12:36:30 +01:00
..
2009-11-01 17:05:00 +01:00
2009-05-07 14:54:40 +02:00
2009-05-07 14:54:40 +02:00
2009-05-07 14:54:40 +02:00
2009-11-23 20:59:24 +01:00
2009-11-06 17:50:24 +01:00
2009-05-07 14:54:40 +02:00
2009-05-10 18:38:47 +01:00
2008-09-01 07:59:13 +02:00
2009-05-20 14:43:17 +02:00
2009-05-07 14:54:40 +02:00
2009-12-12 19:23:10 +01:00
2009-09-17 14:18:44 +01:00
2009-11-01 17:05:00 +01:00
2009-12-30 13:25:02 +01:00
2008-09-24 00:32:53 +02:00
2009-05-07 14:54:40 +02:00
2009-12-30 13:25:20 +01:00
2009-05-10 18:38:47 +01:00
2009-11-25 17:42:41 +01:00
2009-11-09 08:43:34 +01:00
2009-11-14 17:57:50 +01:00
2009-11-14 17:57:50 +01:00
2009-05-07 14:54:40 +02:00
2009-09-04 08:21:07 +01:00
2009-07-02 06:29:14 +01:00
2009-05-07 14:54:40 +02:00
2009-11-01 17:05:00 +01:00
2009-05-07 14:54:40 +02:00
2010-02-01 12:14:37 +01:00
2010-02-01 12:14:37 +01:00
2009-11-07 10:08:28 +01:00
2009-05-07 14:54:40 +02:00
2010-02-01 12:14:37 +01:00
2009-05-10 18:38:47 +01:00
2009-05-07 14:54:40 +02:00
2009-12-30 13:25:02 +01:00