Mercurial > libavformat.hg
changeset 1820:ec025d5fbbe2 libavformat
get_packetheader() forgot to read the header_checksum in big packets
patch from Clemens Ladisch cladisch AT fastmail dot net
(stray base64 patch reverted in the next commits)
author | lu_zero |
---|---|
date | Wed, 28 Feb 2007 03:28:31 +0000 |
parents | 5e4bfdf0ecaf |
children | f4ed6ef1b391 |
files | http.c nutdec.c |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/http.c Tue Feb 27 16:05:19 2007 +0000 +++ b/http.c Wed Feb 28 03:28:31 2007 +0000 @@ -206,14 +206,17 @@ HTTPContext *s = h->priv_data; int post, err, ch; char line[1024], *q; - char *auth_b64; + char *auth_b64 = av_malloc(strlen(auth) * 4 / 3 + 12); offset_t off = s->off; + if (auth_b64 == NULL) return AVERROR(ENOMEM); /* send http header */ post = h->flags & URL_WRONLY; - auth_b64 = av_base64_encode((uint8_t *)auth, strlen(auth)); + auth_b64 = av_base64_encode(auth_b64, strlen(auth) * 4 / 3 + 12, + (uint8_t *)auth, strlen(auth)); + snprintf(s->buffer, sizeof(s->buffer), "%s %s HTTP/1.1\r\n" "User-Agent: %s\r\n"