Commit a7fa5ce6 authored by Jordi Ortiz's avatar Jordi Ortiz Committed by Diego Biurrun

libschroedingerdec: check malloc

Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 3b52e9da
......@@ -106,6 +106,11 @@ static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
return NULL;
in_buf = av_malloc(next_pu_offset);
if (!in_buf) {
av_log(parse_ctx, AV_LOG_ERROR, "Unable to allocate input buffer\n");
return NULL;
}
memcpy(in_buf, parse_ctx->buf, next_pu_offset);
enc_buf = schro_buffer_new_with_data(in_buf, next_pu_offset);
enc_buf->free = libschroedinger_decode_buffer_free;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment