commit b229234e62efcc9119fc7b321ca1e3846d678b12 from: Stefan Sperling date: Sat Oct 17 01:13:57 2020 UTC fix missing allocaion failure check in diff_algo_patience() commit - 7187fe972091ffb934d90ab11967d006868f8d7c commit + b229234e62efcc9119fc7b321ca1e3846d678b12 blob - ce30d7edc9df8f722c837f476d478fa55ee9617b blob + ab51ce7a36d7cfb1b9e50d047239e9b760dba83b --- lib/diff_patience.c +++ lib/diff_patience.c @@ -363,6 +363,8 @@ diff_algo_patience(const struct diff_algo_config *algo atom_pointers = recallocarray(NULL, 0, unique_in_both_count * 2, sizeof(struct diff_atom*)); + if (atom_pointers == NULL) + return ENOMEM; /* Half for the list of atoms that still need to be put on * stacks */ struct diff_atom **uniques = atom_pointers;