rpc : catch std::length_error in recv_msg (#31204)

This commit is contained in:
Katara authored and GitHub committed 2026-10-27 15:04:55 +02:00
1 parent 8542e94350
commit 7ecb57f7ad
1 file changed
+4 -1
+4 -1
View File
@@ -348,7 +348,10 @@ static bool recv_msg(socket_ptr sock, std::vector<uint8_t> & input) {
}
try {
input.resize(size);
} catch (const std::bad_alloc & e) {
} catch (const std::length_error &) {
LOG_ERROR("Failed to allocate input buffer of size %" PRIu64 "\n", size);
return false;
} catch (const std::bad_alloc &) {
LOG_ERROR("Failed to allocate input buffer of size %" PRIu64 "\n", size);
return false;
}