[FFmpeg-devel] [PATCH] lavfi/dnn: Fix OpenVINO missing model file corrupt issue.

Anton Khirnov anton at khirnov.net
Sat Aug 6 15:57:19 EEST 2022


Quoting Fu, Ting (2022-08-05 05:34:30)
> Hi Anton,
> 
> Thank you for comment. 
> After double checked the OpenVINO, it is true that the code would corrupt if the binary file does not exist.

Can you be more specific about what do you mean by "corrupt"?

> We would have nothing to do in this case, that's why I code to check the file existence explicitly.
> Yes, you are right, it is not a proper way to do like this. But I have no idea how to solve it more decently, since trying to open it as you mentioned would lead to crush immediately. Maybe there is some solution I don’t know, any further input would be appreciated. 😊

It should be fixed in OpenVINO, and we should disallow any older
versions from being used in lavfi. Your patch is still susceptible to
someone removing the file after the access() call.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list