diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/HTTP.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/HTTP.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/HTTP.cpp 2026-10-06 01:20:22.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/HTTP.cpp 2026-10-06 01:04:15.000000000 +0000 @@ -161,10 +161,12 @@ ? url.substr(pos_p, std::string::npos) : url.substr(pos_p, pos_c - pos_p); - + /* stoi throws exception on failure, we don't need it */ port = 0; - auto res = std::from_chars (port_str.data(), port_str.data() + port_str.size(), port); - if (res.ec != std::errc()) - return false; - + for (char c : port_str) { + if (c < '0' || c > '9') + return false; + port *= 10; + port += c - '0'; + } if (pos_c == std::string::npos) return true; /* no path part */