summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/scsi/ss_scanjet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/ss_scanjet.c b/sys/scsi/ss_scanjet.c
index d331491aa44..18c8a3a6f96 100644
--- a/sys/scsi/ss_scanjet.c
+++ b/sys/scsi/ss_scanjet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ss_scanjet.c,v 1.30 2006/11/28 16:56:50 dlg Exp $ */
+/* $OpenBSD: ss_scanjet.c,v 1.31 2007/06/01 20:59:04 moritz Exp $ */
/* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */
/*
@@ -444,7 +444,7 @@ scanjet_set_window(ss, flags)
(int)(ss->sio.scan_brightness) - 128,
(int)(ss->sio.scan_contrast) - 128);
- if (n >= sizeof escape_codes || n == -1)
+ if (n >= sizeof escape_codes - len)
return (ENOMEM);
len += n;