Bug 29511 - crash in ffmpeg metadata handler
Summary: crash in ffmpeg metadata handler
Alias: None
Product: Sisyphus
Classification: Development
Component: mediatomb (show other bugs)
Version: unstable
Hardware: all Linux
: P3 critical
Assignee: Sergey Bolshakov
QA Contact: qa-sisyphus
URL: https://bugs.gentoo.org/attachment.cg...
Keywords: relnote
Depends on:
Reported: 2013-10-22 23:58 MSK by Konstantin A Lepikhov (L.A. Kostis)
Modified: 2013-10-24 14:46 MSK (History)
0 users

See Also:

Fix from upstream (876 bytes, patch)
2013-10-22 23:58 MSK, Konstantin A Lepikhov (L.A. Kostis)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin A Lepikhov (L.A. Kostis) 2013-10-22 23:58:08 MSK
Created attachment 5977 [details]
Fix from upstream

Reproducible: Always

Steps to Reproduce:
1.Update to latest version from Sisyphus
2.Start the daemon
3.wait a couple of seconds for segfault (or if no DB, go to the web interface and add some files, then wait for segfault)
Actual Results:  
Segfault with the following in syslog:

kernel: mediatomb[10301]: segfault at 25 ip b724bab7 sp b12d0af0 error 4 in libavformat.so.53.32.100[b71a1000+d3000]

It seems that initializing the pointer does the trick:

--- a/src/metadata/ffmpeg_handler.cc
+++ b/src/metadata/ffmpeg_handler.cc
@@ -259,7 +259,7 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
     int x = 0;
     int y = 0;
-       AVFormatContext *pFormatCtx;
+       AVFormatContext *pFormatCtx = NULL;
        // Suppress all log messages
Comment 1 Repository Robot 2013-10-24 14:46:23 MSK
mediatomb-0.12.1-alt11 -> sisyphus:

* Thu Oct 24 2013 Sergey Bolshakov <sbolshakov@altlinux> 0.12.1-alt11
- fixed segfault in metadata scanner (closes: #29511)