Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buffer overrun using PutN (closes Tencent#672)
Fix inconsistent calling of template functions in PutN in stream.h. When used with a GenericStringBuffer<<UTF8>, MemoryPoolAllocator>, PutN would call PurReserve from stream.h, and PutUnsafe from stringbuffer.h. This resulted in bytes being added to the buffer without allocating space. This was not an issue when used with the default memory allocator, because in this case the specialized PutN is used from stringbuffer.h.
- Loading branch information