summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-08-06 00:00:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-08-06 00:00:42 +0000
commit59909a9c54adeb4233d799044d42c2db4565c67d (patch)
tree32a3432063611cc3425d269c12e8253c4d9b0d85 /sys/arch/sparc/dev
parent74941a3857b470a833f212ed267662d23f68edea (diff)
Every time you ignore uiomove() return value, $DEITY kills a little
$ADORABLE_FELINE. ok deraadt@ matthew@
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/bpp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sparc/dev/bpp.c b/sys/arch/sparc/dev/bpp.c
index 774f693efb0..242f4bd1292 100644
--- a/sys/arch/sparc/dev/bpp.c
+++ b/sys/arch/sparc/dev/bpp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpp.c,v 1.4 2003/06/03 21:09:02 deraadt Exp $ */
+/* $OpenBSD: bpp.c,v 1.5 2010/08/06 00:00:38 miod Exp $ */
/*
* Copyright (c) 1997, Jason Downs. All rights reserved.
@@ -273,7 +273,9 @@ bppwrite(dev, uio, flags)
int error = 0;
while ((n = min(BPP_BSIZE, uio->uio_resid)) != 0) {
- uiomove(bpp->sc_cp = bpp->sc_inbuf->b_data, n, uio);
+ error = uiomove(bpp->sc_cp = bpp->sc_inbuf->b_data, n, uio);
+ if (error != 0)
+ return error;
bpp->sc_count = n;
error = bpppushbytes(bpp);
if (error) {