diff options
| author | Paul Eggert | 2011-06-22 09:15:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-22 09:15:41 -0700 |
| commit | 31fd4b3280acee4030efde84a0e23ae2b006ee31 (patch) | |
| tree | 0b2245daf7e6f772cbaabf8916faeb34683bb390 /src/ftfont.c | |
| parent | ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f (diff) | |
| parent | 510005210ac9f4d813c4a2cc99b2c3c11e57c055 (diff) | |
| download | emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.tar.gz emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.zip | |
Merge: Integer overflow and signedness fixes (Bug#8873).
A few related buffer overrun fixes, too.
Diffstat (limited to 'src/ftfont.c')
| -rw-r--r-- | src/ftfont.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 5037d54bc2f..4e313a89021 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2385,8 +2385,8 @@ static Lisp_Object | |||
| 2385 | ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | 2385 | ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, |
| 2386 | FT_Face ft_face, OTF *otf, FT_Matrix *matrix) | 2386 | FT_Face ft_face, OTF *otf, FT_Matrix *matrix) |
| 2387 | { | 2387 | { |
| 2388 | EMACS_UINT len = LGSTRING_GLYPH_LEN (lgstring); | 2388 | EMACS_INT len = LGSTRING_GLYPH_LEN (lgstring); |
| 2389 | EMACS_UINT i; | 2389 | EMACS_INT i; |
| 2390 | struct MFLTFontFT flt_font_ft; | 2390 | struct MFLTFontFT flt_font_ft; |
| 2391 | MFLT *flt = NULL; | 2391 | MFLT *flt = NULL; |
| 2392 | int with_variation_selector = 0; | 2392 | int with_variation_selector = 0; |
| @@ -2412,7 +2412,10 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | |||
| 2412 | if (CHAR_VARIATION_SELECTOR_P (c)) | 2412 | if (CHAR_VARIATION_SELECTOR_P (c)) |
| 2413 | with_variation_selector++; | 2413 | with_variation_selector++; |
| 2414 | } | 2414 | } |
| 2415 | |||
| 2415 | len = i; | 2416 | len = i; |
| 2417 | lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2); | ||
| 2418 | |||
| 2416 | if (with_variation_selector) | 2419 | if (with_variation_selector) |
| 2417 | { | 2420 | { |
| 2418 | setup_otf_gstring (len); | 2421 | setup_otf_gstring (len); |