mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-04 03:10:52 +00:00
Fix Windows memory error (fixes #330)
This commit is contained in:
parent
a323f6f49f
commit
b3f0dbff62
|
@ -1,3 +1,7 @@
|
||||||
|
2019-05-16 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
|
||||||
|
* Fix memory error in Windows-only code from typo. Fixes #330.
|
||||||
|
|
||||||
2019-04-27 Jay Berkenbilt <ejb@ql.org>
|
2019-04-27 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
|
||||||
* 8.4.1: release
|
* 8.4.1: release
|
||||||
|
|
|
@ -371,7 +371,7 @@ QUtil::safe_fopen(char const* filename, char const* mode)
|
||||||
(static_cast<unsigned char>(u16.at(i)) << 8) +
|
(static_cast<unsigned char>(u16.at(i)) << 8) +
|
||||||
static_cast<unsigned char>(u16.at(i+1)));
|
static_cast<unsigned char>(u16.at(i+1)));
|
||||||
}
|
}
|
||||||
PointerHolder<wchar_t> wmodep(true, new wchar_t(strlen(mode) + 1));
|
PointerHolder<wchar_t> wmodep(true, new wchar_t[strlen(mode) + 1]);
|
||||||
wchar_t* wmode = wmodep.getPointer();
|
wchar_t* wmode = wmodep.getPointer();
|
||||||
wmode[strlen(mode)] = 0;
|
wmode[strlen(mode)] = 0;
|
||||||
for (size_t i = 0; i < strlen(mode); ++i)
|
for (size_t i = 0; i < strlen(mode); ++i)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user