Zero-init copy2 writebuf

robust
Howard Chu 11 years ago
parent 2825ad64c2
commit 7f038d0f15
  1. 1
      libraries/liblmdb/mdb.c

@ -8445,6 +8445,7 @@ mdb_env_copyfd1(MDB_env *env, HANDLE fd)
if (rc) if (rc)
return rc; return rc;
#endif #endif
memset(my.mc_wbuf[0], 0, MDB_WBUF*2);
my.mc_wbuf[1] = my.mc_wbuf[0] + MDB_WBUF; my.mc_wbuf[1] = my.mc_wbuf[0] + MDB_WBUF;
my.mc_wlen[0] = 0; my.mc_wlen[0] = 0;
my.mc_wlen[1] = 0; my.mc_wlen[1] = 0;

Loading…
Cancel
Save