Peter Denison <bug-repo...@marshadder.org> wrote: Hi Peter,
> I have now repeated the crash with packages installed only from the > main squeeze archives. Can you try the attached patch, on top of the current testing package? Drop the file in debian/patches, add it to 00list and rebuild the package. I believe this should fix the issue. Thanks, JB. -- Julien BLACHE - Debian & GNU/Linux Developer - <jbla...@debian.org> Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
#! /bin/sh /usr/share/dpatch/dpatch-run ## 17_fix_ffmpeg_buffer.dpatch by <jbla...@debian.org> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix ffmpeg buffer alignment - allocate the buffer with malloc() instead ## DP: of using a static buffer inside a struct where we can't control the ## DP: alignment. @DPATCH@ diff -urNad mt-daapd-0.9~r1696.dfsg~/src/plugins/ssc-ffmpeg.c mt-daapd-0.9~r1696.dfsg/src/plugins/ssc-ffmpeg.c --- mt-daapd-0.9~r1696.dfsg~/src/plugins/ssc-ffmpeg.c 2009-07-17 17:42:06.673425841 +0200 +++ mt-daapd-0.9~r1696.dfsg/src/plugins/ssc-ffmpeg.c 2009-07-17 17:42:19.741426741 +0200 @@ -52,7 +52,7 @@ int packet_size; int audio_stream; - char buffer[BUFFER_SIZE]; + char *buffer; char *buf_remainder; int buf_remainder_len; @@ -149,6 +149,14 @@ handle=(SSCHANDLE *)malloc(sizeof(SSCHANDLE)); if(handle) { memset(handle,0,sizeof(SSCHANDLE)); + + handle->buffer = (char *)malloc(BUFFER_SIZE); + if (!handle->buffer) { + free(handle); + return NULL; + } + + memset(handle->buffer, 0, BUFFER_SIZE); } return (void*)handle; @@ -158,6 +166,7 @@ SSCHANDLE *handle = (SSCHANDLE *)vp; ssc_ffmpeg_close(handle); if(handle) { + free(handle->buffer); free(handle); }