[x264-devel] Fix masked access violation in KERNEL32

Anton Mitrofanov git at videolan.org
Mon Aug 26 19:48:36 CEST 2013


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Mon Aug 26 21:20:31 2013 +0400| [9e941d1fabb2de4b15f169057a07dc395307d2ce] | committer: Jason Garrett-Glaser

Fix masked access violation in KERNEL32

Caused crashes under gdb in Windows and might cause other unknown problems.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=9e941d1fabb2de4b15f169057a07dc395307d2ce
---

 common/osdep.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/osdep.c b/common/osdep.c
index 6952dd0..7564f65 100644
--- a/common/osdep.c
+++ b/common/osdep.c
@@ -192,7 +192,8 @@ int x264_vfprintf( FILE *stream, const char *format, va_list arg )
         {
             /* WriteConsoleW is the most reliable way to output Unicode to a console. */
             int length_utf16 = MultiByteToWideChar( CP_UTF8, 0, buf, length, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t) );
-            WriteConsoleW( console, buf_utf16, length_utf16, NULL, NULL );
+            DWORD written;
+            WriteConsoleW( console, buf_utf16, length_utf16, &written, NULL );
             return length;
         }
     }



More information about the x264-devel mailing list