diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index a9cb0e206..d1a4de50a 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -572,7 +572,7 @@ void readln(int fd, char *buf) int parse_response(URL *url, void * /*opt*/, CSTATE *state) { - char header[2049], /*str[255]*/ str[2048]; // combined with 2nd local str from id3 part + char header[2048], /*str[255]*/ str[2048]; // combined with 2nd local str from id3 part char *ptr, chr=0, lastchr=0; int hlen = 0, response; int meta_interval = 0, rval; diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 45588ae2c..31aad56fc 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -382,7 +382,7 @@ void CDBoxInfoWidget::paint() now -= info.uptime; std::string str_boot(strftime(g_Locale->getText(LOCALE_EXTRA_DBOXINFO_TIMEFORMAT), now)); - char ubuf[80] = { 0 }; + char ubuf[256] = { 0 }; char sbuf[256] = { 0 }; int updays, uphours, upminutes; @@ -392,14 +392,14 @@ void CDBoxInfoWidget::paint() upminutes %= 60; if (updays) { - snprintf(ubuf, sizeof(sbuf), "%d day%s, ", updays, (updays != 1) ? "s" : ""); + snprintf(ubuf, sizeof(ubuf), "%d day%s, ", updays, (updays != 1) ? "s" : ""); strcat(sbuf, ubuf); } if (uphours) { - snprintf(ubuf, sizeof(sbuf), "%d hour%s, ", uphours, (uphours != 1) ? "s" : ""); + snprintf(ubuf, sizeof(ubuf), "%d hour%s, ", uphours, (uphours != 1) ? "s" : ""); strcat(sbuf, ubuf); } - snprintf(ubuf,sizeof(sbuf), "%d minute%s", upminutes, (upminutes != 1) ? "s" : ""); + snprintf(ubuf,sizeof(ubuf), "%d minute%s", upminutes, (upminutes != 1) ? "s" : ""); strcat(sbuf, ubuf); snprintf(ubuf, sizeof(ubuf), "%s: ", g_Locale->getText(LOCALE_EXTRA_DBOXINFO_LOAD)); diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 7ff3f88e2..eb829cb24 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -469,6 +469,7 @@ void CLuaInstance::runScript(const char *fileName, const char *arg0, ...) if (i >= 64) { fprintf(stderr, "CLuaInstance::runScript: too many arguments!\n"); args.clear(); + va_end(list); return; } args.push_back(temp); diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 50b8deb52..ffa23ca55 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -124,6 +124,7 @@ int my_system(int argc, const char *arg, ...) if (i == argv_max) { fprintf(stderr, "my_system: too many arguments!\n"); + va_end(args); return -1; } argv[i] = va_arg(args, const char *);