浏览代码

lib/vsprintf.c: wrong conversion function used

Fix wrong conversion function used by strict_strtou*

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Reported-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Yi Yang 16 年之前
父节点
当前提交
29a6d39bf3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/vsprintf.c

+ 1 - 1
lib/vsprintf.c

@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\
 	if (len == 0)							\
 		return -EINVAL;						\
 									\
-	val = simple_strtoul(cp, &tail, base);				\
+	val = simple_strtou##type(cp, &tail, base);			\
 	if ((*tail == '\0') ||						\
 		((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
 		*res = val;						\