diff options
author | rsc <devnull@localhost> | 2004-06-16 03:12:39 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-06-16 03:12:39 +0000 |
commit | c5eb686096c8e5fef13230867ea7ce494b0376d7 (patch) | |
tree | 238367ec42340b6de15a266d21516cc329d386f8 /src/libventi | |
parent | d3232caf63ede13732594f455f11909000817c9a (diff) | |
download | plan9port-c5eb686096c8e5fef13230867ea7ce494b0376d7.tar.gz plan9port-c5eb686096c8e5fef13230867ea7ce494b0376d7.tar.bz2 plan9port-c5eb686096c8e5fef13230867ea7ce494b0376d7.zip |
extra assertion, fix leak in vtread
Diffstat (limited to 'src/libventi')
-rw-r--r-- | src/libventi/client.c | 1 | ||||
-rw-r--r-- | src/libventi/file.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libventi/client.c b/src/libventi/client.c index 5d51cc7d..a58b2089 100644 --- 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 index 655b3891..50e99f3c 100644 --- 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); |