patch msvcrt.dll file.c MSVCRT_tmpfile() open_flags --> stream_flags

fred srctmp11 at aldccp.at
Sun Jan 29 08:25:20 CST 2012


Hi Wine-Team

A old bugfix on my system

----------------------------------------------------------
1.
dlls/msvcrt/file.c
MSVCRT_tmpfile(void)
	Change   open_flags --> stream_flags
----------------------------------------------------------

--- dlls/msvcrt/file.c.orig	2010-10-08 15:29:19.000000000 +0000
+++ dlls/msvcrt/file.c	2010-10-12 22:32:51.000000000 +0000
@@ -3246,7 +3246,7 @@
        fd = MSVCRT__open(filename, MSVCRT__O_CREAT | MSVCRT__O_BINARY |
MSVCRT__O_RDWR | MSVCRT__O_TEMPORARY);
        if (fd != -1 && (file = msvcrt_alloc_fp()))
        {
-    if (msvcrt_init_fp(file, fd, MSVCRT__O_RDWR) == -1)
+    if (msvcrt_init_fp(file, fd, MSVCRT__IORW) == -1)
          {
              file->_flag = 0;
              file = NULL;

--------------------------------------------------------
2.
dlls/dbghelp/storage.c
pool_strdup()
	dbg Error loop on my system (str == NULL)
--------------------------------------------------------

--- dlls/dbghelp/storage.c.orig	Fri Dec 28 15:26:23 2007
+++ dlls/dbghelp/storage.c	Tue Jan  8 20:48:16 2008
@@ -108,7 +108,12 @@
      char* pool_strdup(struct pool* pool, const char* str)
      {
          char* ret;
-    if ((ret = pool_alloc(pool, strlen(str) + 1))) strcpy(ret, str);
+    if (str) {
+	if ((ret = pool_alloc(pool, strlen(str) + 1))) strcpy(ret, str);
+    } else {
+	ret = pool_alloc(pool, 1);
+	*ret = 0;
+    }
          return ret;
      }

Best Regards,

Hoefer Alfred

srctmp11 at aldccp.at

-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wineAH.1.1.patch
Type: application/octet-stream
Size: 911 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120129/c4f22efb/attachment-0001.obj>


More information about the wine-patches mailing list