Fix negative pointer bug (hopefully)

This commit is contained in:
Donald Burr 2015-02-20 10:28:44 -08:00
parent 74c05161b5
commit a6ba3b309b

View file

@ -52,7 +52,7 @@ void cls()
int baseport = 4000;
const int BUFLEN = 1024*1024; // in bytes
const int BUFLEN = 10240*1024; // in bytes
//const int ABUFLEN = 1024; // in words
// Yes this is ugly. :P
@ -175,6 +175,7 @@ struct image_sockin : public sockin {
virtual void handle(unsigned char *data, int len, int listener) {
int begin = -1, end = -1;
if (len <= 0) return;
if ((len + bufsize) > IBUFLEN) {
bufsize = 0;
}