summaryrefslogtreecommitdiff
path: root/sys/dev/ic/lpt.c
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/dev/ic/lpt.c
parent74941a3857b470a833f212ed267662d23f68edea (diff)
Every time you ignore uiomove() return value, $DEITY kills a little
$ADORABLE_FELINE. ok deraadt@ matthew@
Diffstat (limited to 'sys/dev/ic/lpt.c')
-rw-r--r--sys/dev/ic/lpt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c
index 9f7ba6cb891..4d2b1b50eb2 100644
--- a/sys/dev/ic/lpt.c
+++ b/sys/dev/ic/lpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpt.c,v 1.6 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: lpt.c,v 1.7 2010/08/06 00:00:41 miod Exp $ */
/* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */
/*
@@ -373,7 +373,9 @@ lptwrite(dev, uio, flags)
int error = 0;
while ((n = min(LPT_BSIZE, uio->uio_resid)) != 0) {
- uiomove(sc->sc_cp = sc->sc_inbuf->b_data, n, uio);
+ error = uiomove(sc->sc_cp = sc->sc_inbuf->b_data, n, uio);
+ if (error != 0)
+ return error;
sc->sc_count = n;
error = lptpushbytes(sc);
if (error) {