diff --git a/acatcher/acatcher.cxx.template b/acatcher/acatcher.cxx.template index 35268b5..3c4cb50 100644 --- a/acatcher/acatcher.cxx.template +++ b/acatcher/acatcher.cxx.template @@ -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; }