diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-10-21 21:29:28 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2020-10-21 22:42:51 +0200 |
commit | 98f6c00dad96d3150a9b969a0ee67addc78ac5f0 (patch) | |
tree | 2c1455f3b208275aecc1395453f3396a85eb7800 /libqpdf/BufferInputSource.cc | |
parent | ef127001b36b42042874812e0d06dccf92cdb229 (diff) | |
download | qpdf-98f6c00dad96d3150a9b969a0ee67addc78ac5f0.tar.zst |
Protect numeric conversion against user's locale (fixes #459)
Diffstat (limited to 'libqpdf/BufferInputSource.cc')
-rw-r--r-- | libqpdf/BufferInputSource.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libqpdf/BufferInputSource.cc b/libqpdf/BufferInputSource.cc index 9e141510..fb4010ef 100644 --- a/libqpdf/BufferInputSource.cc +++ b/libqpdf/BufferInputSource.cc @@ -108,6 +108,7 @@ BufferInputSource::range_check(qpdf_offset_t cur, qpdf_offset_t delta) ((std::numeric_limits<qpdf_offset_t>::max() - cur) < delta)) { std::ostringstream msg; + msg.imbue(std::locale::classic()); msg << "seeking forward from " << cur << " by " << delta << " would cause an overflow of the offset type"; |