aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/OffsetInputSource.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-10-21 21:29:28 +0200
committerJay Berkenbilt <ejb@ql.org>2020-10-21 22:42:51 +0200
commit98f6c00dad96d3150a9b969a0ee67addc78ac5f0 (patch)
tree2c1455f3b208275aecc1395453f3396a85eb7800 /libqpdf/OffsetInputSource.cc
parentef127001b36b42042874812e0d06dccf92cdb229 (diff)
downloadqpdf-98f6c00dad96d3150a9b969a0ee67addc78ac5f0.tar.zst
Protect numeric conversion against user's locale (fixes #459)
Diffstat (limited to 'libqpdf/OffsetInputSource.cc')
-rw-r--r--libqpdf/OffsetInputSource.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libqpdf/OffsetInputSource.cc b/libqpdf/OffsetInputSource.cc
index b6dae255..88eca4e4 100644
--- a/libqpdf/OffsetInputSource.cc
+++ b/libqpdf/OffsetInputSource.cc
@@ -47,6 +47,7 @@ OffsetInputSource::seek(qpdf_offset_t offset, int whence)
if (offset > this->max_safe_offset)
{
std::ostringstream msg;
+ msg.imbue(std::locale::classic());
msg << "seeking to " << offset
<< " offset by " << global_offset
<< " would cause an overflow of the offset type";