Skip to content
Browse files

fix bug on ngx_http_push_stream_get_formatted_chunk function on 32bit…

…s OS
  • Loading branch information...
1 parent a497d59 commit 01d608aaaa8e724a104b571461b66388d0dd5dc6 @wandenberg committed Feb 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ngx_http_push_stream_module_utils.c
View
2 src/ngx_http_push_stream_module_utils.c
@@ -1235,7 +1235,7 @@ ngx_http_push_stream_get_formatted_chunk(const u_char *text, off_t len, ngx_pool
/* the "0000000000000000" is 64-bit hexadimal string */
chunk = ngx_http_push_stream_create_str(temp_pool, sizeof("0000000000000000" CRLF CRLF CRLF) + len);
if (chunk != NULL) {
- ngx_sprintf(chunk->data, "%xO" CRLF "%*s" CRLF CRLF, len + sizeof(CRLF) - 1, len, text);
+ ngx_sprintf(chunk->data, "%xO" CRLF "%*s" CRLF CRLF, len + sizeof(CRLF) - 1, (size_t) len, text);
chunk->len = ngx_strlen(chunk->data);
}
return chunk;

0 comments on commit 01d608a

Please sign in to comment.
Something went wrong with that request. Please try again.