Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc fix off-by-one in switch function argument val...
details: https://anonhg.NetBSD.org/src/rev/d0b99429c738
branches: trunk
changeset: 783418:d0b99429c738
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu Dec 20 03:51:04 2012 +0000
description:
fix off-by-one in switch function argument validation.
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 3789d8930d79 -r d0b99429c738 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Thu Dec 20 03:08:39 2012 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Thu Dec 20 03:51:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.26 2012/12/15 00:03:00 jakllsch Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.27 2012/12/20 03:51:04 jakllsch Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -45,7 +45,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.26 2012/12/15 00:03:00 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.27 2012/12/20 03:51:04 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1089,7 +1089,7 @@
return EINVAL;
if (group <= 0 || group > 6 ||
- function < 0 || function > 16)
+ function < 0 || function > 15)
return EINVAL;
gsft = (group - 1) << 2;
Home |
Main Index |
Thread Index |
Old Index