]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Avoid NULL pointer dereference in make_status_items().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 16 Jul 2017 14:21:07 +0000 (16:21 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 16 Jul 2017 14:33:54 +0000 (16:33 +0200)
commita633f41986f8b6c37cbfdd487cccd23997def033
treee103d243bd55c35aceb9adae09a0ee848fd8ab79
parenta7a8d30e55563dd18fafecc9af710f6c37393016
server: Avoid NULL pointer dereference in make_status_items().

The previous patch (Update status items on blob events) modified the
aft event handler to call make_status_items() on certain blob events
because the event could have rendered the current status information
stale.

However, if no audio file is open at the time the event occurs,
make_status_items() triggers a segfault because the ->path and ->hash
members of status_item_ls_data are NULL in this case.

This patch avoids the problem by returning early from
make_status_items() if ->path is NULL.
aft.c