From a6048409e11b4155d3668c0434bfe004fc2c9f2a Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Wed, 14 Nov 2007 16:58:38 -0800 Subject: [PATCH] --- yaml --- r: 73664 b: refs/heads/master c: 6fc48af82cef55546d640778698943b6227b7fb0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/sysctl.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 83d2b9816916..3c64a1fccc47 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dbd0cf48842700c3a694dcd32b29e63e27f37acc +refs/heads/master: 6fc48af82cef55546d640778698943b6227b7fb0 diff --git a/trunk/kernel/sysctl.c b/trunk/kernel/sysctl.c index 3a1744fed2b6..0deed82a6156 100644 --- a/trunk/kernel/sysctl.c +++ b/trunk/kernel/sysctl.c @@ -2620,6 +2620,10 @@ static int deprecated_sysctl_warning(struct __sysctl_args *args) int name[CTL_MAXNAME]; int i; + /* Check args->nlen. */ + if (args->nlen < 0 || args->nlen > CTL_MAXNAME) + return -ENOTDIR; + /* Read in the sysctl name for better debug message logging */ for (i = 0; i < args->nlen; i++) if (get_user(name[i], args->name + i))