--- make-4.4.1-orig/src/w32/subproc/sub_proc.c 2023-01-12 03:05:58.000000000 +0300 +++ make-4.4.1/src/w32/subproc/sub_proc.c 2024-09-18 08:11:33.881081000 +0300 @@ -645,6 +645,11 @@ &bytes_returned, 0) == FALSE || bytes_returned < 2) { pproc->last_err = GetLastError(); + if (!pproc->last_err) { + fprintf (stderr, "ReadFile failed to read more than 2 bytes of input (read %d bytes from %s).\n", + bytes_returned, exec_fname); + pproc->last_err = ERROR_BAD_FORMAT; + } pproc->lerrno = E_IO; CloseHandle(exec_handle); return(-1);