mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +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(";
|
||||
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
allcss_fout << fn;
|
||||
allcss_fout << (char*)fn;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user