Opened 11 years ago

Closed 11 years ago

#4747 closed defect (fixed)

return if a waveheader can't be allocated in JACK_Write

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

JACK_Write in libs/libmyth/bio2jack.c tries to allocate a wave header. It checks to see if it was successful. But it only reports. Later in the same function, it dereferences the wave header pointer. Which would cause a segfault.

Attachments (1)

libs_libmyth_bio2jack.c-return-if-malloc-fails.patch (742 bytes) - added by Erik Hovland <erik@…> 11 years ago.
Adds a return to a null pointer check so the potentially null pointer is not dereferenced

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Erik Hovland <erik@…>

Adds a return to a null pointer check so the potentially null pointer is not dereferenced

comment:1 Changed 11 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [16262]) If a malloc fails, exit cleanly. Very unlikely, but no harm to check. Closes #4747

Note: See TracTickets for help on using tickets.