diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-01-14 11:24:19 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-01-14 11:24:19 +0100 |
| commit | e8a6e863ed77975975d6240eaadfef32eb869299 (patch) | |
| tree | b1e0ada4409ad8eb82b8bb9d437d400e6c72cb39 /apt-pkg | |
| parent | 8f065d249e620cf147b1779a141c14e032a699fd (diff) | |
proxy: Avoids triggering bounds check in std::string_view
Check for empty string_view instead of first byte being '\0';
this otherwise breaks when compiling with higher ABI version.
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/contrib/proxy.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/proxy.cc b/apt-pkg/contrib/proxy.cc index 9a9a9f29c..aad272190 100644 --- a/apt-pkg/contrib/proxy.cc +++ b/apt-pkg/contrib/proxy.cc @@ -91,7 +91,7 @@ bool AutoDetectProxy(URI &URL) return true; APT::StringView const cleanedbuf = _strstrip(buf); // We warn about this as the implementor probably meant to use DIRECT instead - if (cleanedbuf[0] == '\0') + if (cleanedbuf.empty()) { _error->Warning("ProxyAutoDetect command returned an empty line"); return true; |
