Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284669

Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x
Date 2015-12-06 01:20 +0100
Message-ID <qCvdx-81R-17@gated-at.bofh.it> (permalink)
References <qCv3R-7XL-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 2015-12-06 at 01:05 +0100, Rasmus Villemoes wrote:
> If char is signed and ch happens to be negative, printing ch with
> "%02x" will not do as intended (when ch is -19, one will get
> "ffffffed"). Fix that by masking with 0xff.

I presume there are a lot of these in the kernel.
Did you use a tool to find this or just inspection?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: speakup: kobjects.c: fix char argument to %02x Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-12-06 01:10 +0100
  Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x Joe Perches <joe@perches.com> - 2015-12-06 01:20 +0100
    Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-12-06 01:30 +0100
      Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x Joe Perches <joe@perches.com> - 2015-12-06 01:30 +0100

csiph-web