commit c5eb686096c8e5fef13230867ea7ce494b0376d7
parent d3232caf63ede13732594f455f11909000817c9a
Author: rsc <devnull@localhost>
Date: Wed, 16 Jun 2004 03:12:39 +0000
extra assertion, fix leak in vtread
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/libventi/client.c b/src/libventi/client.c
@@ -98,6 +98,7 @@ vtread(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n)
nn = packetsize(p);
if(packetconsume(p, buf, nn) < 0)
abort();
+ packetfree(p);
return nn;
}
diff --git a/src/libventi/file.c b/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);