Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/rpc/virnetlibsshsession.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index b9143239b9..039d8a278c 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -157,6 +157,7 @@ static int virNetLibsshSessionOnceInit(void) { const char *dbgLevelStr; + int dbgLevel; if (!VIR_CLASS_NEW(virNetLibsshSession, virClassForObjectLockable())) return -1; @@ -172,10 +173,9 @@ virNetLibsshSessionOnceInit(void) #endif dbgLevelStr = virGetEnvAllowSUID("LIBVIRT_LIBSSH_DEBUG"); - if (dbgLevelStr) { - int dbgLevel = virParseNumber(&dbgLevelStr); + if (dbgLevelStr && + virStrToLong_i(dbgLevelStr, NULL, 10, &dbgLevel) >= 0) ssh_set_log_level(dbgLevel); - } return 0; } -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list