diff --git a/sys/src/9/port/devtls.c b/sys/src/9/port/devtls.c index 4b691c50e..e4974ec77 100644 --- a/sys/src/9/port/devtls.c +++ b/sys/src/9/port/devtls.c @@ -766,8 +766,8 @@ if(tr->debug)pprint("consumed %d header\n", RecHdrLen); if(ver != tr->version && (tr->verset || ver < MinProtoVersion || ver > MaxProtoVersion)) rcvError(tr, EProtocolVersion, "devtls expected ver=%x%s, saw (len=%d) type=%x ver=%x '%.12s'", tr->version, tr->verset?"/set":"", len, type, ver, (char*)header); - if(len > MaxCipherRecLen || len < 0) - rcvError(tr, ERecordOverflow, "record message too long %d", len); + if(len > MaxCipherRecLen || len <= 0) + rcvError(tr, ERecordOverflow, "bad record message length %d", len); ensure(tr, &tr->unprocessed, len); nconsumed = 0; poperror();