aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/caldav/Makefile.am
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-10-14 07:44:37 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-10-14 20:29:50 +0200
commit39d30073180aeed73ce26ca2a20be19d643e3160 (patch)
treea8569600292464f52147ec952f672c1d0b9110a7 /contrib/caldav/Makefile.am
parent9ef5fe2191c5d1d857bc4fe828c15268ba8caa90 (diff)
downloadcalcurse-39d30073180aeed73ce26ca2a20be19d643e3160.tar.gz
calcurse-39d30073180aeed73ce26ca2a20be19d643e3160.zip
Prevent segfault when all todo items are hidden
To prevent from illegal memory access, we checked whether the list of todo items is empty before performing an interactive todo item action such as flagging or removal. However, since 1a4bf2b (Add a "hide completed" view to the todo panel, 2016-01-17), it is possible to hide completed items from the todo panel. Thus, it may occur that the todo list box is empty while the list of todo items is not. To detect such situations as well, teach todo_get_item() to return NULL if the requested item does not exist. Then, instead of checking whether the todo item list is non-empty, make sure that the item returned by todo_get_item() is non-NULL when performing an action. Reported-by: Vlad Glagolev <scm@vaygr.net> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib/caldav/Makefile.am')
0 files changed, 0 insertions, 0 deletions