summaryrefslogtreecommitdiffstats
path: root/patches/make-4.4.1-sub_proc.patch
blob: 7be2800a703d36d2dcd549359a75f8d55a1d56b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- 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);