mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
use an empty writebuf rather than a NULL one
This commit is contained in:
@@ -37,7 +37,9 @@ circbuffer * cbuf_new(unsigned int size) {
|
||||
}
|
||||
|
||||
cbuf = (circbuffer*)m_malloc(sizeof(circbuffer));
|
||||
cbuf->data = (unsigned char*)m_malloc(size);
|
||||
if (size > 0) {
|
||||
cbuf->data = (unsigned char*)m_malloc(size);
|
||||
}
|
||||
cbuf->used = 0;
|
||||
cbuf->readpos = 0;
|
||||
cbuf->writepos = 0;
|
||||
|
||||
Reference in New Issue
Block a user