mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-27 04:48:21 +01:00
src/options.c: increase buffer from 45 to 57, to accommodate string sizes specified (detected by gcc7's -Wstringpop-overflow)
This commit is contained in:
parent
88b13a825b
commit
72fb9dcb49
@ -37,7 +37,7 @@ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps)
|
|||||||
while (opt->name && strcmp(name, opt->name))
|
while (opt->name && strcmp(name, opt->name))
|
||||||
opt++;
|
opt++;
|
||||||
if (!opt->func) {
|
if (!opt->func) {
|
||||||
char msg[45];
|
char msg[57];
|
||||||
sprintf(msg, "unsupported option `%.35s'", name);
|
sprintf(msg, "unsupported option `%.35s'", name);
|
||||||
luaL_argerror(L, 2, msg);
|
luaL_argerror(L, 2, msg);
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps)
|
|||||||
while (opt->name && strcmp(name, opt->name))
|
while (opt->name && strcmp(name, opt->name))
|
||||||
opt++;
|
opt++;
|
||||||
if (!opt->func) {
|
if (!opt->func) {
|
||||||
char msg[45];
|
char msg[57];
|
||||||
sprintf(msg, "unsupported option `%.35s'", name);
|
sprintf(msg, "unsupported option `%.35s'", name);
|
||||||
luaL_argerror(L, 2, msg);
|
luaL_argerror(L, 2, msg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user