linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 남영민 <youngmin.nam@samsung.com>
To: <pmladek@suse.com>, <andriy.shevchenko@linux.intel.com>,
	<sergey.senozhatsky@gmail.com>, <geert+renesas@glider.be>,
	<rostedt@goodmis.org>, <me@tobin.cc>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] vsprintf: fix data type of variable in string_nocheck()
Date: Mon, 10 Jun 2019 16:47:07 +0900	[thread overview]
Message-ID: <040301d51f60$b4959100$1dc0b300$@samsung.com> (raw)
In-Reply-To: CGME20190610074708epcas2p3dcbdc49d114c544c1de721666d574b43@epcas2p3.samsung.com

This patch fixes data type of precision with int.
The precision is declared as signed int in struct printf_spec.

Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
---
 lib/vsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 63937044c57d..cd0cd9279b12 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -599,7 +599,7 @@ static char *string_nocheck(char *buf, char *end, const char *s,
 			    struct printf_spec spec)
 {
 	int len = 0;
-	size_t lim = spec.precision;
+	int lim = spec.precision;
 
 	while (lim--) {
 		char c = *s++;
-- 
2.21.0


       reply	other threads:[~2019-06-10  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190610074708epcas2p3dcbdc49d114c544c1de721666d574b43@epcas2p3.samsung.com>
2019-06-10  7:47 ` 남영민 [this message]
2019-06-10  8:16   ` [PATCH] vsprintf: fix data type of variable in string_nocheck() Sergey Senozhatsky
2019-06-12  7:56     ` Petr Mladek

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='040301d51f60$b4959100$1dc0b300$@samsung.com' \
    --to=youngmin.nam@samsung.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@tobin.cc \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.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;
as well as URLs for NNTP newsgroup(s).