Module Name: src
Committed By: lukem
Date: Tue Apr 14 07:36:16 UTC 2009
Modified Files:
src/usr.bin/vndcompress: vndcompress.c
Log Message:
Fix another sign-compare issue
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/vndcompress/vndcompress.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/vndcompress/vndcompress.c
diff -u src/usr.bin/vndcompress/vndcompress.c:1.5 src/usr.bin/vndcompress/vndcompress.c:1.6
--- src/usr.bin/vndcompress/vndcompress.c:1.5 Tue Apr 14 07:28:23 2009
+++ src/usr.bin/vndcompress/vndcompress.c Tue Apr 14 07:36:16 2009
@@ -1,4 +1,4 @@
-/* $Id: vndcompress.c,v 1.5 2009/04/14 07:28:23 lukem Exp $ */
+/* $Id: vndcompress.c,v 1.6 2009/04/14 07:36:16 lukem Exp $ */
/*
* Copyright (c) 2005 by Florian Stoehr <[email protected]>
@@ -260,7 +260,7 @@
offtable_size = (clh->num_blocks + 1) * sizeof(uint64_t);
offt = (uint64_t *)malloc(offtable_size);
- if (read(fd, offt, offtable_size) < offtable_size) {
+ if ((uint32_t)read(fd, offt, offtable_size) != offtable_size) {
free(offt);
return NULL;
}