From: John Spencer <maillist-alsa@barfooze.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] fix bug 5579: invalid long long format specifier
Date: Wed, 25 Apr 2012 19:21:31 +0200 [thread overview]
Message-ID: <4F98329B.5060605@barfooze.de> (raw)
In-Reply-To: <4F96F773.8050203@canonical.com>
On 04/24/2012 08:56 PM, David Henningsson wrote:
> On 04/24/2012 12:58 PM, John Spencer wrote:
>> the attached patch fixes an invalid long long format specifier issue (%L
>> was used by mistake, which is the long double specifier).
>> this lead to abort() on 64bit system, making some of the alsa-utils
>> unusable.
>
> Thanks very much for this patch! I'm trying to access the bug tracker
> but it seems to be down - could you explain a little where and how
> this bug manifests itself, if you have any good test case etc?
>
it manifests itself when a POSIX compliant C library is used (i.e. not
glibc).
musl libc's snprintf will return an error by detecting the invalid
combination %Li
err = snprintf(res, sizeof(res), "%Li", config->u.integer64);
thus the following code is triggered
if (err< 0 || err == sizeof(res)) {
assert(0);
return -ENOMEM;
however, depending on how stdarg is implemented, a buggy implementation
could eventually try to load a double from the floating point stack,
instead of using the stack/integer registers, thus causing a crash,
which would be even worse.
prev parent reply other threads:[~2012-04-25 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 10:58 [PATCH] fix bug 5579: invalid long long format specifier John Spencer
2012-04-24 13:39 ` Takashi Iwai
2012-04-24 18:56 ` David Henningsson
2012-04-25 17:21 ` John Spencer [this message]
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=4F98329B.5060605@barfooze.de \
--to=maillist-alsa@barfooze.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.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 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.