Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13437 closed Bug Report - Crash (fixed)

Potential crash in MetaIOFLACVorbis::getPictureFromFile.

Reported by: David Hampton Owned by: David Hampton
Priority: minor Milestone: 30.1
Component: MythTV - Mythmetadatalookup Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The code to extract images from FLAC files has a bug that will crash the system. While stepping through the list of pictures in a FLAC file to find one of the right type, it dereferences the not-yet-set found picture variable instead of dereferencing the current picture variable.

Change History (2)

comment:1 Changed 5 years ago by David Hampton <mythtv@…>

Resolution: fixed
Status: assignedclosed

In 6a21dd100e/mythtv:

tidy: Fix test to retrieve picture from FLAC file.

The clang-tidy "call and message" check pointed out the inevitability
of calling a function through a nullptr. The getPictureFromFile
function was testing the wrong variable when determining whether or
not a picture was the requested type. While there, make a variable
'auto' to tighten up the code.

Fixes #13437.

comment:2 Changed 5 years ago by David Hampton <mythtv@…>

In 0999fd0ff/mythtv:

tidy: Fix test to retrieve picture from FLAC file.

The clang-tidy "call and message" check pointed out the inevitability
of calling a function through a nullptr. The getPictureFromFile
function was testing the wrong variable when determining whether or
not a picture was the requested type. While there, make a variable
'auto' to tighten up the code.

Fixes #13437.

(cherry picked from commit 6a21dd100e453d24437e980ef01c5525a53efbc1)

Note: See TracTickets for help on using tickets.