From: Russell Bryant Date: Sat, 9 Oct 2004 16:32:21 +0000 (+0000) Subject: Fix wave file lengths (bug #2486) X-Git-Tag: 1.0.11.1~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09ca3690b5e42a7394fafbb5571da3fa4047bd07;p=thirdparty%2Fasterisk.git Fix wave file lengths (bug #2486) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@3963 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index 9fcc3c9ceb..5b4d31f6a5 100755 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -219,7 +219,7 @@ static int update_header(int fd) end = lseek(fd, 0, SEEK_END); /* in a gsm WAV, data starts 60 bytes in */ bytes = end - 60; - datalen = htoll(bytes); + datalen = htoll((bytes + 1) & ~0x1); filelen = htoll(52 + ((bytes + 1) & ~0x1)); if (cur < 0) { ast_log(LOG_WARNING, "Unable to find our position\n");