intel / libvpl

Intel® Video Processing Library (Intel® VPL) API, dispatcher, and examples
https://intel.github.io/libvpl/
MIT License
262 stars 80 forks source link

Fix function 'StringFromGUID2' using an incorrect parameter #133

Closed xelement closed 1 month ago

xelement commented 1 month ago

Issue

The third parameter of the function 'StringFromGUID2' is count of 'LPOLESTR' but not 'byte' size of buffer. Using 'sizeof' here will cause a warning 'C6386'

Solution

use '_countof' instead of 'sizeof'

How Tested

Buffer size 40 with wchar type is enough, do not need test

mav-intel commented 1 month ago

Hi @xelement, Thanks for your PR! The PR is failing linting (you can try yourself with script/test lint Linting returns: 1: T1 Title exceeds max length (59>50): "Fix function 'StringFromGUID2' using an incorrect parameter" I suggest Fix incorrect parameter to StringFromGUID2()

xelement commented 1 month ago

Done