[Patch] for patch

"Christian Ehrlicher" <[email protected]>
Newsgroups gmane.comp.windows.gnu.user
Message-ID <[email protected]>
Hi,

the current win32 binary of patch.exe crashes on user input. After some investigation I found the solution (see attached patch and http://msdn2.microsoft.com/en-us/library/3197776x(VS.71).aspx).

Is it possible to realase a new version of patch.exe which contains this fix? It's a really annoying bug... :(

Thx,
Christian Ehrlicher 
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
GnuWin32-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
util.c.patch (application/octet-stream, 431 B)
--- util.c.orig	2006-03-10 16:24:48.000000000 +0100
+++ util.c	2007-04-24 10:31:29.843750000 +0200
@@ -626,8 +626,9 @@
 	}
 #else /* _WIN32 */
 	{
-#define MAXTTYLINE 255
-	  char wbuf[MAXTTYLINE]={MAXTTYLINE};
+#define MAXTTYLINE 127   // size_t is signed on windows
+          // +3 -> string, \0 + 2 additional bytes
+	  char wbuf[MAXTTYLINE+3]={MAXTTYLINE};
 	  char *result;
 	  if (!buf)
 	    memory_fatal ();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.