View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016079 | Scribus | public | 2020-03-30 20:35 | 2020-04-05 19:37 | |
Reporter | Pontobart | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.6.svn | ||||
Fixed in Version | 1.5.6.svn | ||||
Summary | 0016079: Copy the full codeToGID table | ||||
Description | At least since poppler 0.19 the CIDToGID table returned from GfxFont is an int* and not a Gushort*. Due to this for some fonts only half of the table got copied and the rest was garbage. The attached patch fixes this and defensively reduces the number of places where the type information is repeated. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
codeToGID_table_size.diff (1,092 bytes)
Index: scribus/plugins/import/pdf/slaoutput.cpp =================================================================== --- scribus/plugins/import/pdf/slaoutput.cpp (Revision 23544) +++ scribus/plugins/import/pdf/slaoutput.cpp (Arbeitskopie) @@ -3054,9 +3054,9 @@ case fontCIDType0COT: if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); - codeToGID = (int *)gmallocn(n, sizeof(int)); + codeToGID = (int *)gmallocn(n, sizeof(*codeToGID)); memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(int)); + n * sizeof(*codeToGID)); } else { codeToGID = nullptr; n = 0; @@ -3079,9 +3079,9 @@ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); if (n) { - codeToGID = (int *)gmallocn(n, sizeof(int)); + codeToGID = (int *)gmallocn(n, sizeof(*codeToGID)); memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(Gushort)); + n * sizeof(*codeToGID)); } } else { if (fileName) |
|
Applied, thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-03-30 20:35 | Pontobart | New Issue | |
2020-03-30 20:35 | Pontobart | File Added: codeToGID_table_size.diff | |
2020-03-30 22:36 | jghali | Assigned To | => jghali |
2020-03-30 22:36 | jghali | Status | new => resolved |
2020-03-30 22:36 | jghali | Resolution | open => fixed |
2020-03-30 22:36 | jghali | Fixed in Version | => 1.5.6.svn |
2020-03-30 22:36 | jghali | Note Added: 0047483 | |
2020-04-05 19:37 | cbradney | Status | resolved => closed |