nsc: allocate extra 16 bytes for output buffer in case of alignment.
This commit is contained in:
parent
28b203e57f
commit
7d8a2bfaef
@ -186,12 +186,12 @@ static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s)
|
||||
length = context->width * context->height * 4;
|
||||
if (context->bmpdata == NULL)
|
||||
{
|
||||
context->bmpdata = xzalloc(length);
|
||||
context->bmpdata = xzalloc(length + 16);
|
||||
context->bmpdata_length = length;
|
||||
}
|
||||
else if (length > context->bmpdata_length)
|
||||
{
|
||||
context->bmpdata = xrealloc(context->bmpdata, length);
|
||||
context->bmpdata = xrealloc(context->bmpdata, length + 16);
|
||||
context->bmpdata_length = length;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user