--- libmms-0.6.2/src/mmsh.c~ 2011-01-17 05:51:12.000000000 -0500 +++ libmms-0.6.2/src/mmsh.c 2014-04-21 16:27:46.210355967 -0400 @@ -307,7 +307,10 @@ static int get_answer (mms_io_t *io, mms len = 0; } } else { - len ++; + if (++len >= sizeof(this->buf)) { + lprintf("answer too large\n"); + return 0; + } } } if (this->stream_type == MMSH_UNKNOWN) {