aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2007-02-28 03:28:31 +0000
committerLuca Barbato <lu_zero@gentoo.org>2007-02-28 03:28:31 +0000
commitbb0eb714bd8343dfc69857914b99ccd3438430bf (patch)
tree7eae00cbd335b85068f201283c3e3ad91cdab47f /libavformat
parentc2a29455e348f136043a0b3a23637924413180dc (diff)
downloadffmpeg-bb0eb714bd8343dfc69857914b99ccd3438430bf.tar.gz
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) Originally committed as revision 8156 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/http.c7
-rw-r--r--libavformat/nutdec.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 1284c31de8..da619bbd95 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -206,14 +206,17 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
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"
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index e158326273..ec1c04e0f9 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -104,6 +104,8 @@ static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_ch
// start= url_ftell(bc) - 8;
size= get_v(bc);
+ if(size > 4096)
+ get_be32(bc); //FIXME check this
init_checksum(bc, calculate_checksum ? av_crc04C11DB7_update : NULL, 0);