diff --git a/libuuu/buffer.cpp b/libuuu/buffer.cpp index 41364374..6a29c763 100644 --- a/libuuu/buffer.cpp +++ b/libuuu/buffer.cpp @@ -887,6 +887,7 @@ int bz_async_load(string filename, shared_ptr p) total += one.decompress_size; if (total >= p->m_MemSize) { + lock_guard lock(p->m_data_mutex); if (p->reserve(total*1.2)) return -1; }