Is there any method to report error, if sprintf and other library functions being used in driver codebase.

Raj kumar Kamsani 1 Reputation point
2021-04-07T09:17:35.757+00:00

Hello All,

I have driver code with few C/C++ runtime libraries like sprintf(). Due to inclusion of strsafe.h file, compiler is not throwing any error. I can replace sprintf() with RtlStringCchPrintfA().

But I would like add a check, if sprinf() is being used in driver code again, compiler should generate the error. Please let me know, how to achieve this?

Best Regards,
Raj

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,162 questions
{count} votes