Nginx bug?

Maxim Dounin mdounin at mdounin.ru
Wed Jun 8 15:32:41 UTC 2016


Hello!

On Tue, Jun 07, 2016 at 08:15:09PM +0000, Ranier VF wrote:

> Hi,
> nginx-1.10, windows build.
> msvc 2010
> 
> where full_name is u_char [64]
>     b->last = ngx_sprintf(b->last, "{\"uid\": \"%u\", \"full_name\": \"%s\"}", uid, full_name);
> 
> This crash in ngx_string.c (line 257)
>             case 's':
>                 p = va_arg(args, u_char *);
> 
>                 if (slen == (size_t) -1) {
>                     while (*p && buf < last) {
>                         *buf++ = *p++;   // <-- CRASH MSVC 2010
> 
> Anyone, can help with this?

The "%u" format specification is invalid.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list