commit 5a810f318bdf6918a86fe0ce770d2eda026e6932 from: Stefan Sperling date: Tue Apr 30 15:40:14 2024 UTC add default case to the switch statement in choose_patch() Just in case the code futher up gets tweaked again such that the validity check using strchr() will be skipped in some edge case. Lucas agrees commit - c37c2f0a725cab61f43b8fa90096814ca9f24e33 commit + 5a810f318bdf6918a86fe0ce770d2eda026e6932 blob - a08af5c4dae000dbd90f6463e972bc9fe726b1a5 blob + e00dd735e29a8c982aa31faed0b6cb120e11839e --- got/got.c +++ got/got.c @@ -8703,6 +8703,10 @@ choose_patch(int *choice, void *arg, unsigned char sta if (status == GOT_STATUS_MODIFY) *choice = GOT_PATCH_CHOICE_QUIT; break; + default: + printf("invalid response '%s'\n", line); + free(line); + return NULL; } if (!interactive)