Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vndcompress Fix sign-compare in compress_blocks.
details: https://anonhg.NetBSD.org/src/rev/84d6e314e87c
branches: trunk
changeset: 786632:84d6e314e87c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat May 04 14:29:48 2013 +0000
description:
Fix sign-compare in compress_blocks.
Not sure why my builds didn't reveal this one -- they revealed
several others during development.
diffstat:
usr.bin/vndcompress/vndcompress.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6b7b994daae0 -r 84d6e314e87c usr.bin/vndcompress/vndcompress.c
--- a/usr.bin/vndcompress/vndcompress.c Sat May 04 10:21:27 2013 +0000
+++ b/usr.bin/vndcompress/vndcompress.c Sat May 04 14:29:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vndcompress.c,v 1.9 2013/05/04 10:21:27 joerg Exp $ */
+/* $NetBSD: vndcompress.c,v 1.10 2013/05/04 14:29:48 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: vndcompress.c,v 1.9 2013/05/04 10:21:27 joerg Exp $");
+__RCSID("$NetBSD: vndcompress.c,v 1.10 2013/05/04 14:29:48 riastradh Exp $");
#include <sys/endian.h>
@@ -792,7 +792,7 @@
err(1, "read block %"PRIu32, blkno);
assert(n_read >= 0);
assert((uintmax_t)n_read <= (uintmax_t)readsize);
- if (n_read < readsize)
+ if ((uint32_t)n_read < readsize)
errx(1, "partial read of block %"PRIu32": %zd <= %"PRIu32,
blkno, n_read, readsize);
Home |
Main Index |
Thread Index |
Old Index