summaryrefslogtreecommitdiffstats
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2010-08-06 00:00:38 +0000
committermiod <miod@openbsd.org>2010-08-06 00:00:38 +0000
commitfca26c8f08a50b2597e621370bef424312ff47e8 (patch)
treef40fb1e27958c1ecd39237a3ec3260a29095cc5a /sys/arch/sparc
parentdon't return (potential errno) + (potential errno), instead only perform (diff)
downloadwireguard-openbsd-fca26c8f08a50b2597e621370bef424312ff47e8.tar.xz
wireguard-openbsd-fca26c8f08a50b2597e621370bef424312ff47e8.zip
Every time you ignore uiomove() return value, $DEITY kills a little
$ADORABLE_FELINE. ok deraadt@ matthew@
Diffstat (limited to 'sys/arch/sparc')
-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) {