diff --git a/src/video/video.c b/src/video/video.c index 043eb28b..93358ec4 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -788,7 +788,9 @@ static int vc_first_frame(AVFormatContext* format, AVCodecContext* decoder, int } int video_extract_thumbnail(const char* src, const char* dst, int max_w) { - if (file_io_paths(src, dst)) return -1; + if (!src || !dst || strlen(src) >= VIDEO_PATH_MAX || strlen(dst) >= VIDEO_PATH_MAX || file_io_paths(src, dst)) { + DEBUG_ERROR(DEBUG_CATEGORY_VIDEO, "video thumbnail invalid/identical/oversized paths"); return -1; + } if (max_w <= 0) max_w = 320; if (max_w < 2) { DEBUG_ERROR(DEBUG_CATEGORY_VIDEO, "video thumbnail width must be >=2"); return -1; } video_ffmpeg_init(); diff --git a/tests/test_media_async.c b/tests/test_media_async.c index 057b0c87..52e3b6b6 100644 --- a/tests/test_media_async.c +++ b/tests/test_media_async.c @@ -113,7 +113,7 @@ static void* worker_thread(void* arg) { real_op = 3; uint8_t uuid[16]; t0 = now_us(); - ma_uuid(uuid); + if (ma_uuid(uuid)) st->errors++; elapsed = now_us() - t0; int zero = 1; for (int i = 0; i < 16; i++) { if (uuid[i] != 0) { zero = 0; break; } }