From: Swen Schillig <swen@vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>, Yi Yang <yi.y.yang@intel.com>
Subject: [PATCH] lib/vsprintf.c: wrong conversion function used
Date: Thu, 7 Aug 2008 11:24:05 +0200 [thread overview]
Message-ID: <200808071124.06160.swen@vnet.ibm.com> (raw)
From: Swen Schillig <swen@vnet.ibm.com>
The macro define_strict_strtoux() is using the simple_strtoul ()
function as opposed to the simple_strtoull() function.
This leads to false conversions on non-64bit
machines (here 31bit System z).
The following patch fixes the issue introduced by
commit 06b2a76d25d3cfbd14680021c1d356c91be6904e
Author: Yi Yang <yi.y.yang@intel.com>
Date: Fri Feb 8 04:21:57 2008 -0800
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
---
lib/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: HEAD/lib/vsprintf.c
===================================================================
--- HEAD.orig/lib/vsprintf.c
+++ HEAD/lib/vsprintf.c
@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp,
if (len == 0) \
return -EINVAL; \
\
- val = simple_strtoul(cp, &tail, base); \
+ val = simple_strtoull(cp, &tail, base); \
if ((*tail == '\0') || \
((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
*res = val; \
next reply other threads:[~2008-08-07 12:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 9:24 Swen Schillig [this message]
2008-08-10 15:38 ` [PATCH] lib/vsprintf.c: wrong conversion function used Yi Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808071124.06160.swen@vnet.ibm.com \
--to=swen@vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yi.y.yang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox