Keep thumbnail path bounds and check UUID status in stress test
This commit is contained in:
1 parent
0e418c7fa9
commit
5505afd1f3
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -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();
|
||||
|
||||
@@ -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; } }
|
||||
|
||||
Reference in new issue
Block a user