See the FAQ in this directory if you have any problems.
+FIXED IN VERSION 0.52
+=====================
+Fixed a buffer overflow vulnerability discovered by
+Artur Byszko / bajkero <bajkero@security.hack.pl>
+
+
NEW IN VERSION 0.5
==================
Netris now specifically looks for ncurses and uses color if it's
Unlike standard T*tris, Netris gives you a little extra time after
dropping a piece before it solidifies. This allows you to slide the
piece into a notch without waiting for it to fall the whole way down.
-In fact, if you can even slide it off a cliff and it'll start falling
+In fact, you can even slide it off a cliff and it'll start falling
again. If you think it should automatically drop again in this case,
use the -D option.
memcpy(data, netBuf, sizeof(data));
type = ntoh2(data[0]);
size = ntoh2(data[1]);
+ if (size >= sizeof(netBuf))
+ fatal("Received an invalid packet (too large), possibly an attempt\n"
+ " to exploit a vulnerability in versions before 0.52 !");
netBufGoal = size;
if (netBufSize < netBufGoal)
return E_none;
<row> is an integer from 0 to boardHeight-1. 0 is the bottom row.
<col0> ... <coln> are integers separated by spaces, one for each column.
-"0" indicates an empty square. Positive integers indicates blocks.
+"0" indicates an empty square. Positive integers indicate blocks.
Currently only "1" is used, but in the future there may be special kinds of
blocks indicated by higher numbers. Negative integers indicate part of
the currently falling piece. For each block, the absolute value of the
EXAMPLE
=======
Here's a portion of an example log generated by the sample robot. The
-sample robot generates a log file in "log" if the "-l" is given to sr
-(eg "netris -r 'sr -l'").
+sample robot generates a log file in "log" if the "-l" option is given
+to sr (eg "netris -r 'sr -l'").
In this log file, every line is preceeded by two characters. Lines
sent from Netris to the robot are preceeded by two spaces " ", and