GiacomoLaw / Keylogger

A simple keylogger for Windows, Linux and Mac
https://simple-keylogger.github.io/
MIT License
2.06k stars 617 forks source link

Replaced localtime and strcp with localtime_s and strcpy_s, also reformatted code with clang-format #96

Closed MartenBE closed 3 years ago

MartenBE commented 3 years ago

Works in Visual Studio 2019. Solves the following problems:

Severity    Code    Description Project File    Line    Suppression State
Error   C4996   'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.   keylogger   C:\Users\Martijn\git\Keylogger\windows\klog_main.cpp    84  
Error   C4996   'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. keylogger   C:\Users\Martijn\git\Keylogger\windows\klog_main.cpp    88  

No more need to mess with _CRT_SECURE_NO_WARNINGS in Visual Studio no more.

GiacomoLaw commented 3 years ago

Thanks!