From: Miod Vallat Date: Thu, 27 Nov 2025 12:01:35 +0000 (+0100) Subject: Add missing catch block for STL exceptions in createForward. X-Git-Tag: rec-5.4.0-alpha1~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d9786ec28a797bb479a7834777f19b55785183;p=thirdparty%2Fpdns.git Add missing catch block for STL exceptions in createForward. Signed-off-by: Miod Vallat --- diff --git a/pdns/lua-record.cc b/pdns/lua-record.cc index 1ddf071042..a4b5c647f9 100644 --- a/pdns/lua-record.cc +++ b/pdns/lua-record.cc @@ -1079,7 +1079,9 @@ static string lua_createForward() } } return allZerosIP; - } catch (const PDNSException &e) { + } catch (const PDNSException &) { + return allZerosIP; + } catch (const std::exception &) { // thrown by std::stol return allZerosIP; } } diff --git a/regression-tests.auth-py/test_LuaRecords.py b/regression-tests.auth-py/test_LuaRecords.py index b0340ad8d2..0e04d3fad0 100644 --- a/regression-tests.auth-py/test_LuaRecords.py +++ b/regression-tests.auth-py/test_LuaRecords.py @@ -1085,6 +1085,7 @@ class TestLuaRecords(BaseLuaTest): "ip4041424": "0.0.0.0", "ip-441424": "0.0.0.0", "ip-5abcdef": "0.0.0.0", + "some-text-with-more-than-five-dashes": "0.0.0.0", "host64-22-33-44": "64.22.33.44", "2.2.2.2": "0.0.0.0" # filtered }),