mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
src/nhttpd/yhttpd_core/helper.cpp revert unneeded sie check
This commit is contained in:
@@ -81,14 +81,7 @@ std::string timeString(time_t time) {
|
||||
//-------------------------------------------------------------------------
|
||||
std::string string_printf(const char *fmt, ...) {
|
||||
va_list arglist;
|
||||
va_start (arglist, fmt);
|
||||
int len = vsnprintf (NULL, 0, fmt, arglist);
|
||||
va_end (arglist);
|
||||
const int bufferlen = 4*1024;
|
||||
if(len >= bufferlen){
|
||||
printf("string_printf: error: buffer overflow : len %i line %i\n",len,__LINE__);
|
||||
return "error";
|
||||
}
|
||||
char buffer[bufferlen] = {0};
|
||||
va_start(arglist, fmt);
|
||||
vsnprintf(buffer, bufferlen, fmt, arglist);
|
||||
|
Reference in New Issue
Block a user