Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Jan 2018 21:02:46 -0500
From: Rich Felker <>
To: Peter Wang <>
Subject: Re: alternative form flag with zero octal value

On Thu, Jan 11, 2018 at 11:43:05AM +1100, Peter Wang wrote:
> Hi,
> I'm not certain it is a bug, but this program produces "00" instead of "0":
>     #include <stdio.h>
>     int main(void)
>     {
>         printf("%#o\n", 0);
>         return 0;
>     }
> Please Cc: any replies as I am not subscribed to this list.

Indeed, this is a bug. I'm not sure whether it was introduced in
commit 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 or already present,
but it was not present in Dmitry Levin's original more complex version
of the patch. I'm going to essentially revert this commit and replace
it with an alternate one-line fix using infrastructure that wasn't
available at the time but added later in commit

Thanks for the report.


Powered by blists - more mailing lists

Your e-mail address:

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