MT#61856 main: rtpe_config, don't accept xmlrpc timeout < 0

Since this is parsed as type int, potentially can be given as -1.
Hence don't accept the range < 0 and > 2.

Change-Id: I8cdbf6e7626ec89bcd287742ddfbd49a3e1a3c90
pull/1126/merge
Donat Zenichev 1 month ago
parent a37e544289
commit bcd92e137b

@ -1205,7 +1205,7 @@ static void options(int *argc, char ***argv, charp_ht templates) {
die("Invalid Redis endpoint [IP:PORT/INT] '%s' (--redis-subscribe)", redisps_subscribe);
}
if (rtpe_config.fmt > 2)
if (rtpe_config.fmt < 0 || rtpe_config.fmt > 2)
die("Invalid XMLRPC format");
// XXX unify the log facility options

Loading…
Cancel
Save