From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-trivial@nongnu.org, leon.alrae@imgtec.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] jazz_led: fix bad snprintf
Date: Wed, 3 May 2017 15:10:24 +0200 [thread overview]
Message-ID: <cba7fc39-0b43-7514-7bf1-8375f3f7cc38@redhat.com> (raw)
In-Reply-To: <87pofqxfna.fsf@dusky.pond.sub.org>
On 03/05/2017 14:56, Markus Armbruster wrote:
>> snprintf writes at most 2 bytes here including the terminating NUL, so
>> the result is truncated".
>
> You're right; I forgot that snprintf() always adds a NUL. So this *is*
> broken: we write NUL instead of the second digit. Mentioning this in
> the commit message wouldn't hurt.
Well, it does, see the quote. :)
Paolo
next prev parent reply other threads:[~2017-05-03 13:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 10:44 [Qemu-devel] [PATCH] jazz_led: fix bad snprintf Paolo Bonzini
2017-05-03 10:51 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2017-05-03 11:38 ` [Qemu-devel] " Markus Armbruster
2017-05-03 11:54 ` Paolo Bonzini
2017-05-03 12:12 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2017-05-03 12:56 ` [Qemu-devel] " Markus Armbruster
2017-05-03 13:10 ` Paolo Bonzini [this message]
2017-05-03 13:33 ` Markus Armbruster
2017-05-05 6:24 ` Michael Tokarev
2017-05-05 7:22 ` Paolo Bonzini
2017-05-05 9:47 ` Michael Tokarev
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=cba7fc39-0b43-7514-7bf1-8375f3f7cc38@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.