On Mon, Dec 05, 2022 at 04:37:29AM +0000, Xiang, Haihao wrote:
> On Wed, 2022-11-23 at 13:54 -0800, Brian Norris wrote:
> > +                } else if (!strncmp(info->name, "vgem", 4)) {
> 
> The virtual GEM device is vgem, so better to use strcmp here. 

Good point, we probably shouldn't be matching "vgem-foo" driver here.
And drmGetVersion() ensures info->name is 0-terminated, so we're not
gaining any safety by providing bounds.

I think I was needlessly matching libva-utils too closely, where they do
the same strncmp().

v2 incoming.

Brian
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to