commit c5eb686096c8e5fef13230867ea7ce494b0376d7 from: rsc date: Wed Jun 16 03:12:39 2004 UTC extra assertion, fix leak in vtread commit - d3232caf63ede13732594f455f11909000817c9a commit + c5eb686096c8e5fef13230867ea7ce494b0376d7 blob - 5d51cc7d8b399a627782a504ee847c47bfaeafef blob + a58b2089894f4894d12228f7b24fec1229212add --- src/libventi/client.c +++ src/libventi/client.c @@ -98,6 +98,7 @@ vtread(VtConn *z, uchar score[VtScoreSize], uint type, nn = packetsize(p); if(packetconsume(p, buf, nn) < 0) abort(); + packetfree(p); return nn; } blob - 655b3891556108e7c778499403a1067e245673a6 blob + 50e99f3c26973b3c4cea370ef2bc9bdaaa9d7be1 --- src/libventi/file.c +++ src/libventi/file.c @@ -190,6 +190,8 @@ vtfilecreate(VtFile *r, int psize, int dsize, int dir) u32int offset; assert(ISLOCKED(r)); + assert(psize <= VtMaxLumpSize); + assert(dsize <= VtMaxLumpSize); if(!r->dir){ werrstr(ENotDir);