Extensions - Fix buffer overflows and Artillery Tables for GCC (#7641)

* Dynload - Fix buffer overflow

* Fix more buffer overflows

* Fix Artillery Tables compilation for GCC
This commit is contained in:
jonpas
2020-04-18 19:41:37 +02:00
committed by GitHub
parent ddff1c3095
commit 90a8e5a1d6
9 changed files with 32 additions and 33 deletions

View File

@ -40,9 +40,9 @@ std::string getImagePathFromStructuredText(const std::string & input) {
void __stdcall RVExtension(char *output, int outputSize, const char *function) {
ZERO_OUTPUT();
if (!strcmp(function, "version")) {
strncpy(output, ACE_FULL_VERSION_STR, outputSize);
strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1);
} else {
strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize);
strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize - 1);
}
EXTENSION_RETURN();
}