diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32font.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e2eb95f60d0..8aa1707cd30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-02 Jim Meyering <meyering@redhat.com> | ||
| 2 | |||
| 3 | * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372). | ||
| 4 | |||
| 1 | 2012-04-29 Eli Zaretskii <eliz@gnu.org> | 5 | 2012-04-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * xdisp.c (pos_visible_p): If already at a newline from the | 7 | * xdisp.c (pos_visible_p): If already at a newline from the |
diff --git a/src/w32font.c b/src/w32font.c index dab9f4c61b4..8badace9635 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -2045,8 +2045,11 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec) | |||
| 2045 | /* Font families are interned, but allow for strings also in case of | 2045 | /* Font families are interned, but allow for strings also in case of |
| 2046 | user input. */ | 2046 | user input. */ |
| 2047 | else if (SYMBOLP (tmp)) | 2047 | else if (SYMBOLP (tmp)) |
| 2048 | strncpy (logfont->lfFaceName, | 2048 | { |
| 2049 | SDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE); | 2049 | strncpy (logfont->lfFaceName, |
| 2050 | SDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE); | ||
| 2051 | logfont->lfFaceName[LF_FACESIZE-1] = '\0'; | ||
| 2052 | } | ||
| 2050 | } | 2053 | } |
| 2051 | 2054 | ||
| 2052 | tmp = AREF (font_spec, FONT_ADSTYLE_INDEX); | 2055 | tmp = AREF (font_spec, FONT_ADSTYLE_INDEX); |