Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 26 Jul 2016 15:25:40 -0700
From: Jacob Abrams <jacob@...ver.com>
To: musl@...ts.openwall.com
Subject: vprintf.c bug

I believe there is a small bug in vfprintf.c

I had to change the if statement from

    ret = printf_core(f, fmt, &ap2, nl_arg, nl_type);
    if (saved_buf) {

to

    ret = printf_core(f, fmt, &ap2, nl_arg, nl_type);
    if (f->buf == internal_buf) {

Because the saved_buf may be NULL which will result the internal
buffer being used but the file not being reset properly after the call
to printf_core. This was discovered while using MUSL v1.1.4 on an OS
other than Linux.

Please cc-me on any response.

Regards,
Jacob
jacob@...ver.com

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.