commit 1cae65b4629cd43c265d27e7aa98d478878b1ea5 from: Stefan Sperling date: Sun Sep 22 13:27:48 2019 UTC missing error checks in tog(1); found by jj@ with scan-build commit - f66c734c57ba39774198d381b7f9a27cfdd30abe commit + 1cae65b4629cd43c265d27e7aa98d478878b1ea5 blob - 4176e44478d59bb228fc0b7373935cf136d2b289 blob + 6752a4435be9e961ae88c997e52c023d8c82d1e5 --- tog/tog.c +++ tog/tog.c @@ -2029,6 +2029,8 @@ input_log_view(struct tog_view **new_view, struct tog_ &s->commits, &s->thread_args.log_complete, &s->thread_args.commits_needed, &s->thread_args.need_commits); + if (err) + break; if (first == s->first_displayed_entry && s->selected < MIN(view->nlines - 2, s->commits.ncommits - 1)) { @@ -3017,6 +3019,8 @@ draw_blame(struct tog_view *view, struct got_object_id err = format_line(&wline, &width, line, view->ncols, 0); free(line); line = NULL; + if (err) + return err; if (view_needs_focus_indication(view)) wstandout(view->window); waddwstr(view->window, wline);