r15247@tombo: nickm | 2008-04-18 09:30:43 -0400

Partial backport fix for bug in encode_int_internal


svn:r723
This commit is contained in:
Nick Mathewson 2008-04-18 13:31:07 +00:00
parent 212523d196
commit f5b17df11d
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ Changes in 1.4.4-stable:
o Correct the documentation on buffer printf functions.
o Don't warn on unimplemented epoll_create(): this isn't a problem, just a reason to fall back to poll or select.
o Correctly handle timeouts larger than 35 minutes on Linux with epoll.c. This is probably a kernel defect, but we'll have to support old kernels anyway even if it gets fixed.
o Fix a potential stack corruption bug in tagging on 64-bit CPUs.
Changes in 1.4.3-stable:
o include Content-Length in reply for HTTP/1.0 requests with keep-alive

View File

@ -93,7 +93,7 @@ encode_int(struct evbuffer *evbuf, ev_uint32_t number)
int off = 1, nibbles = 0;
ev_uint8_t data[5];
memset(data, 0, sizeof(data));
memset(data, 0, sizeof(ev_uint32_t)+1);
while (number) {
if (off & 0x1)
data[off/2] = (data[off/2] & 0xf0) | (number & 0x0f);