mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 18:54:13 +00:00
Implement proper bounds checks across the codebase (#681)
* Implement proper bounds checks across the codebase * Implement strnlen_s for cross platform
This commit is contained in:
@@ -26,6 +26,13 @@ dLogger::~dLogger() {
|
||||
}
|
||||
|
||||
void dLogger::vLog(const char* format, va_list args) {
|
||||
const char* tempPtr = format; // strlen_s implementation for Linux and Windows
|
||||
for (; *tempPtr != '\0'; ++tempPtr) {
|
||||
size_t size = tempPtr - format;
|
||||
if (size > 600) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
time_t t = time(NULL);
|
||||
struct tm time;
|
||||
|
Reference in New Issue
Block a user