Commit 798f020c authored by Howard Chu's avatar Howard Chu
Browse files

Tweak Win32 errmsg buffer

parent ad8488cf
......@@ -1417,8 +1417,9 @@ mdb_strerror(int err)
* This works as long as no function between the call to mdb_strerror
* and the actual use of the message uses more than 4K of stack.
char pad[4096];
char buf[1024], *ptr = buf;
#define MSGSIZE 1024
#define PADSIZE 4096
char buf[MSGSIZE+PADSIZE], *ptr = buf;
int i;
if (!err)
......@@ -1450,7 +1451,7 @@ mdb_strerror(int err)
buf[0] = 0;
NULL, err, 0, ptr, sizeof(buf), (va_list *)pad);
NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE);
return ptr;
return strerror(err);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment