MediaArea / MediaConch

MediaConch (funded by PREFORMA)
29 stars 11 forks source link

Missed size checks or missed more descriptive allocation error message, MediaInfo/Video/File_Ffv1.cpp #203

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi,

In cases where the function requests memory for the slices current_slice->sample_buffer_new() it is necessary to check beforehand whether the size of the slices (height/width) is meaningful. If the memory cannot be allocated because of these values, MediaConch should not abort with the message

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

Instead it should state the reason, so that faulty Matroska/FFV1 can be detected.

Check "MediaInfoLib/Source/MediaInfo/Video/File_Ffv1.h" (line 78) and "MediaInfoLib/Source/MediaInfo/Video/File_Ffv1.cpp" (line 1281)

Problem was occured, because an errorneous MKV file was transmitted, which triggered MediaConch to allocate 8.355.053.952 bytes on our system.

JeromeMartinez commented 6 years ago

? Why closed, looks like a real issue.

ghost commented 6 years ago

Jep, but I was confused if i was in the right repository. The problem was in Mediaconch, but is MediaInfoLib related...

JeromeMartinez commented 6 years ago

Argh, I did not check the repository, you're right, please create a MediaInfoLib ticket.