mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
fix a potential dangerous pointer
This commit is contained in:
parent
0e27f4b1c5
commit
64a765e90f
@ -18,14 +18,14 @@ void HTMLRenderer::export_remote_font(const FontInfo & info, const string & suff
|
|||||||
allcss_fout << "@font-face{font-family:f" << info.id << ";src:url(";
|
allcss_fout << "@font-face{font-family:f" << info.id << ";src:url(";
|
||||||
|
|
||||||
{
|
{
|
||||||
const char * fn = str_fmt("f%llx%s", info.id, suffix.c_str());
|
auto fn = str_fmt("f%llx%s", info.id, suffix.c_str());
|
||||||
if(param->single_html)
|
if(param->single_html)
|
||||||
{
|
{
|
||||||
allcss_fout << "'data:font/" << fontfileformat << ";base64," << base64stream(ifstream(tmp_dir + "/" + fn, ifstream::binary)) << "'";
|
allcss_fout << "'data:font/" << fontfileformat << ";base64," << base64stream(ifstream(tmp_dir + "/" + (char*)fn, ifstream::binary)) << "'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
allcss_fout << fn;
|
allcss_fout << (char*)fn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user