Author: tfaber
Date: Fri Apr 25 22:02:26 2014
New Revision: 62971
URL:
http://svn.reactos.org/svn/reactos?rev=62971&view=rev
Log:
[CRT]
- Import commit 638c8e38 (Don't overwrite unmatched string in scanf) from Wine. Fixes
crash in msvcrt_winetest:scanf
Modified:
trunk/reactos/lib/sdk/crt/string/scanf.h
Modified: trunk/reactos/lib/sdk/crt/string/scanf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/scanf.h…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/scanf.h [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/string/scanf.h [iso-8859-1] Fri Apr 25 22:02:26 2014
@@ -359,7 +359,7 @@
if (width>0) width--;
}
/* terminate */
- if (!suppress) *sptr = 0;
+ if (st && !suppress) *sptr = 0;
}
break;
widecharstring: { /* read a word into a wchar_t* */
@@ -375,7 +375,7 @@
if (width>0) width--;
}
/* terminate */
- if (!suppress) *sptr = 0;
+ if (st && !suppress) *sptr = 0;
}
break;
/* 'c' and 'C work analogously to 's' and 'S' as
described