httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: cvs commit: apache-1.3/src/os/win32 os.h util_win32.c
Date Thu, 05 Nov 1998 19:31:51 GMT
On 5 Nov 1998 wrote:

>   +            /* Handle "%%" to avoid dying on strftime(out, 600, 1200 "%"'s) */
>   +            case '%':
>   +                new_format[j++] = '%';
>   +                i += 2;
>   +                break;

That isn't going to work is it?

Since strftime needs %% to do %, we can't handle it since strftime will
still try.

I guess this same thing can happen when other single-digit (ie. 
non-0-padded) things are returned.  %w is the only one I can think of that
always returns a single digit, and the win32 strftime may not deal with
that one anyway.  I'm happy if we just live with the fact that it will
fail on certain boundry conditions.  They aren't as unlikely as it may
appear at first, since it is perfectly reasonable for something calling
strftime to know how big the result should be and allocate just enough for
it, but... not worth worrying about, especially since that doesn't (AFAIK)
happen in Apache.

View raw message