summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-11-03 21:00:28 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-11-03 21:00:28 +0000
commit12e8f17619dee98185c658cf83bc34d152b08097 (patch)
tree7e3e40bc00b83155528af3a20c9d8e36d55ce906
parentfcf0b72c56d982455238aafebbc4db83e1ed89b1 (diff)
correct test logic. ok guenther
-rw-r--r--sys/kern/subr_disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 9b224dcd94f..75e4517e467 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.172 2014/11/03 16:55:21 tedu Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.173 2014/11/03 21:00:27 tedu Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -702,7 +702,7 @@ readgptlabel(struct buf *bp, void (*strat)(struct buf *),
* Header size must be greater than or equal to 92 and less
* than or equal to the logical block size.
*/
- if (ghsize < GPTMINHDRSIZE && ghsize > DEV_BSIZE)
+ if (ghsize < GPTMINHDRSIZE || ghsize > DEV_BSIZE)
return (EINVAL);
if (letoh64(gh.gh_lba_start) >= DL_GETDSIZE(lp) ||