mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 08:33:23 -05:00
Protect against possible segfault if the artwork pixel format is unknown
- thank you groinwood for reporting this bug
This commit is contained in:
parent
317ad2ba41
commit
294d7a270f
@ -204,6 +204,14 @@ artwork_rescale(struct evbuffer *evbuf, AVFormatContext *src_ctx, int s, int out
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (src->pix_fmt < 0)
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_ART, "Unknown pixel format for artwork %s\n", src_ctx->filename);
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
|
goto out_close_src;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set up output */
|
/* Set up output */
|
||||||
dst_fmt = av_guess_format("image2", NULL, NULL);
|
dst_fmt = av_guess_format("image2", NULL, NULL);
|
||||||
if (!dst_fmt)
|
if (!dst_fmt)
|
||||||
|
Loading…
Reference in New Issue
Block a user