diff options
| author | Po Lu | 2024-01-06 15:24:58 +0800 |
|---|---|---|
| committer | Po Lu | 2024-01-06 15:28:05 +0800 |
| commit | 2f59052602e71fb818dd5d671be119793864e712 (patch) | |
| tree | cceb8e607a87e2e4913daa64b254bd9912a13d4a /src | |
| parent | 37889523278fe65733938fb11c3701898309961c (diff) | |
| download | emacs-2f59052602e71fb818dd5d671be119793864e712.tar.gz emacs-2f59052602e71fb818dd5d671be119793864e712.zip | |
Properly parse TTC tables with digital signatures
* src/sfnt.c (sfnt_read_ttc_header): Don't inadvertently
overwrite first two offsets while reading the digital signature.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sfnt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sfnt.c b/src/sfnt.c index aa8b49a9ecd..36240f4cdff 100644 --- a/src/sfnt.c +++ b/src/sfnt.c | |||
| @@ -6195,7 +6195,7 @@ sfnt_read_ttc_header (int fd) | |||
| 6195 | size = (SFNT_ENDOF (struct sfnt_ttc_header, ul_dsig_offset, | 6195 | size = (SFNT_ENDOF (struct sfnt_ttc_header, ul_dsig_offset, |
| 6196 | uint32_t) | 6196 | uint32_t) |
| 6197 | - offsetof (struct sfnt_ttc_header, ul_dsig_tag)); | 6197 | - offsetof (struct sfnt_ttc_header, ul_dsig_tag)); |
| 6198 | rc = read (fd, &ttc->ul_dsig_offset, size); | 6198 | rc = read (fd, &ttc->ul_dsig_tag, size); |
| 6199 | if (rc == -1 || rc < size) | 6199 | if (rc == -1 || rc < size) |
| 6200 | { | 6200 | { |
| 6201 | xfree (ttc); | 6201 | xfree (ttc); |
| @@ -20631,8 +20631,8 @@ main (int argc, char **argv) | |||
| 20631 | return 1; | 20631 | return 1; |
| 20632 | } | 20632 | } |
| 20633 | 20633 | ||
| 20634 | #define FANCY_PPEM 44 | 20634 | #define FANCY_PPEM 14 |
| 20635 | #define EASY_PPEM 44 | 20635 | #define EASY_PPEM 14 |
| 20636 | 20636 | ||
| 20637 | interpreter = NULL; | 20637 | interpreter = NULL; |
| 20638 | head = sfnt_read_head_table (fd, font); | 20638 | head = sfnt_read_head_table (fd, font); |