mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-19 12:06:29 -04:00
Must memset the new allocation or we can use an unitialized value from the buffer
This commit is contained in:
@@ -54,6 +54,8 @@ unsigned int Buffer::expand(unsigned int count) {
|
||||
if ( mStorage ) {
|
||||
memcpy(newStorage, mHead, mSize);
|
||||
delete[] mStorage;
|
||||
} else {
|
||||
memset(newStorage, 0, mAllocation);
|
||||
}
|
||||
mStorage = newStorage;
|
||||
mHead = mStorage;
|
||||
|
||||
Reference in New Issue
Block a user