diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-06 00:00:42 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-06 00:00:42 +0000 |
commit | 59909a9c54adeb4233d799044d42c2db4565c67d (patch) | |
tree | 32a3432063611cc3425d269c12e8253c4d9b0d85 /sys/dev/ic/lpt.c | |
parent | 74941a3857b470a833f212ed267662d23f68edea (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.c | 6 |
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) { |