From: Daniil Kolomiiets -X (dkolomii - SOFTSERVE INC at Cisco) Date: Thu, 24 Jul 2025 21:55:28 +0000 (+0000) Subject: Pull request #4823: Appid: Rpc exception handling X-Git-Tag: 3.9.3.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a9fe0d488d937f93d582b34a6e7f2f8b974c21e;p=thirdparty%2Fsnort3.git Pull request #4823: Appid: Rpc exception handling Merge in SNORT/snort3 from ~DKOLOMII/snort3:rpc_exception_handling to master Squashed commit of the following: commit ffafe7bfa059888acb7b4d794ab7496dccdf9490 Author: Daniil Kolomiiets Date: Wed Jul 23 06:45:44 2025 -0400 appid: prevent out_of_range and invalid_argument in rpc --- diff --git a/src/network_inspectors/appid/service_plugins/service_rpc.cc b/src/network_inspectors/appid/service_plugins/service_rpc.cc index aae5685b8..6d55ba0e6 100644 --- a/src/network_inspectors/appid/service_plugins/service_rpc.cc +++ b/src/network_inspectors/appid/service_plugins/service_rpc.cc @@ -329,7 +329,7 @@ static bool validate_and_parse_universal_address(string& data, uint32_t &addres string tok; while (getline(tokenizer, tok, '.')) { - if (!all_of(tok.begin(), tok.end(), ::isdigit)) + if (!all_of(tok.begin(), tok.end(), ::isdigit) || tok.length() > 3 || tok.empty()) return false; int tmp = stoi(tok); if (tmp > 255)