diff options
| author | Paul Eggert | 2011-08-29 11:46:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-29 11:46:42 -0700 |
| commit | c21721cc3953732047ffdfe268764898f089f74b (patch) | |
| tree | 3ada1b251b233bf7f723d8649384f6b2968078c8 /src/ChangeLog | |
| parent | b5cd19054673bfa46a4f0d1ac3905deeafcf94ff (diff) | |
| download | emacs-c21721cc3953732047ffdfe268764898f089f74b.tar.gz emacs-c21721cc3953732047ffdfe268764898f089f74b.zip | |
* font.c (font_unparse_xlfd): Don't blindly alloca long strings.
Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
fits in int, when using sprintf. Use single snprintf to count
length of string rather than counting it via multiple sprintfs;
that's simpler and more reliable.
(APPEND_SPRINTF): New macro.
(font_unparse_fcname): Use it to avoid sprintf buffer overrun.
(generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
sprintf, in case result does not fit in int.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4624e5fc30e..f94f9c4632f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -39,6 +39,16 @@ | |||
| 39 | * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; | 39 | * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; |
| 40 | use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. | 40 | use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. |
| 41 | 41 | ||
| 42 | * font.c (font_unparse_xlfd): Don't blindly alloca long strings. | ||
| 43 | Don't assume XINT result fits in int, or that XFLOAT_DATA * 10 | ||
| 44 | fits in int, when using sprintf. Use single snprintf to count | ||
| 45 | length of string rather than counting it via multiple sprintfs; | ||
| 46 | that's simpler and more reliable. | ||
| 47 | (APPEND_SPRINTF): New macro. | ||
| 48 | (font_unparse_fcname): Use it to avoid sprintf buffer overrun. | ||
| 49 | (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not | ||
| 50 | sprintf, in case result does not fit in int. | ||
| 51 | |||
| 42 | 2011-08-26 Paul Eggert <eggert@cs.ucla.edu> | 52 | 2011-08-26 Paul Eggert <eggert@cs.ucla.edu> |
| 43 | 53 | ||
| 44 | Integer and memory overflow issues (Bug#9196). | 54 | Integer and memory overflow issues (Bug#9196). |