1 Aug 2008 15:53
Patch for pformat.c in winsup/mingw CVS
Colin Harrison <colin.harrison <at> virgin.net>
2008-08-01 13:53:53 GMT
2008-08-01 13:53:53 GMT
Hi,
The latest CVS winsup/mingw runtime caused a crash, for me, in strlen() when
testing previously 'good' code built with it in the toolchain.
I found this patch fixed the problem for me, so it may be of help to
others...
--- ./mingw/mingwex/stdio/save_pformat.c 2008-07-29
00:24:20.000000000 +0100
+++ ./mingw/mingwex/stdio/pformat.c 2008-07-31 19:30:29.000000000 +0100
<at> <at> -358,7 +358,7 <at> <at>
* This is implemented as a trivial call to `__pformat_putchars()',
* passing the length of the input string as the character count.
*/
- __pformat_putchars( s, strlen( s ), stream );
+ __pformat_putchars( s, s ? strlen( s ) : 0, stream );
}
static
<at> <at> -436,7 +436,7 <at> <at>
* This is implemented as a trivial call to `__pformat_wputchars()',
* passing the length of the input string as the character count.
*/
- __pformat_wputchars( s, wcslen( s ), stream );
+ __pformat_wputchars( s, s ? wcslen( s ) : 0, stream );
}
static __inline__
Thanks
(Continue reading)
RSS Feed