commit 36e83e5eea8d1387c024006cc320e4ef9d545b16 from: Omar Polo date: Tue Aug 16 09:35:17 2022 UTC check for fprintf failure commit - 217e00e5c96081b997cc75f9314f631347527fdf commit + 36e83e5eea8d1387c024006cc320e4ef9d545b16 blob - f671a4f105400e52465bc32e860ae0b0b1e71afd blob + 530b713f15da935fc9e60332b0cbd976118130ed --- lib/diff.c +++ lib/diff.c @@ -903,6 +903,9 @@ show_object_id(struct got_diff_line **lines, size_t *n off_t outoff = 0; n = fprintf(outfile, "%s %c %s\n", obj_typestr, ch, id_str); + if (n < 0) + return got_error_from_errno("fprintf"); + if (lines != NULL && *lines != NULL) { if (*nlines == 0) { err = add_line_metadata(lines, nlines, 0,