commit e3199de8d492801af7a1268d0bd0e8339074a9cd from: Stefan Sperling date: Sun Mar 21 19:09:35 2021 UTC fix strftime return value check; found by jrick commit - e600f1246e15fff13251ba9d299d74a24ae579c2 commit + e3199de8d492801af7a1268d0bd0e8339074a9cd blob - 72b046e72813d5b96fe84dcbe2363d5afb0fc7f9 blob + 28c535ec25b39ce9be78c197d5c2a4e393907add --- got/got.c +++ got/got.c @@ -7785,8 +7785,7 @@ get_commit_brief_str(char **brief_str, struct got_comm committer_time = got_object_commit_get_committer_time(commit); if (localtime_r(&committer_time, &tm) == NULL) return got_error_from_errno("localtime_r"); - if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d", &tm) - >= sizeof(datebuf)) + if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d", &tm) == 0) return got_error(GOT_ERR_NO_SPACE); author0 = strdup(got_object_commit_get_author(commit));