commit a219eefd27b5f1aafc768c7b6c75ed0e203ee5cb from: Stefan Sperling via: Thomas Adam date: Sun May 05 09:50:52 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 - aeac2f67f6cccbabc915bfd6d54fdaa96d18f180 commit + a219eefd27b5f1aafc768c7b6c75ed0e203ee5cb blob - 12cfacc7603a2419cccf6dd39cce2e127b8ace9e blob + e001ff0ac88d80c90be055f13b7a2a79e386ede5 --- got/got.c +++ got/got.c @@ -8702,6 +8702,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)