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

Community Center | Not monitored
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.