aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32font.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8063c8d8166..a4d7bb64919 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-05-05 Jim Meyering <meyering@redhat.com>
2
3 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
4
12012-05-04 Stefan Monnier <monnier@iro.umontreal.ca> 52012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * data.c (PUT_ERROR): New macro. 7 * data.c (PUT_ERROR): New macro.
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);