aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2010-03-01 20:50:57 +0900
committerKenichi Handa2010-03-01 20:50:57 +0900
commit4aa2c3b2704bcdff6f0f3f93eb919772e8f3eaf5 (patch)
tree7f2923d0b2ce3d8209f35100c092752f82ddd505 /src
parentd99ea08e068c55c2b6250bbed835dcc9ba56c190 (diff)
parentdd21b6216dea34d95fad1860ad1c0b2a0735b867 (diff)
downloademacs-4aa2c3b2704bcdff6f0f3f93eb919772e8f3eaf5.tar.gz
emacs-4aa2c3b2704bcdff6f0f3f93eb919772e8f3eaf5.zip
from trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/charset.c4
-rw-r--r--src/w32uniscribe.c2
3 files changed, 15 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ac909cc7885..f0a620b7b99 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12010-02-28 Chong Yidong <cyd@stupidchicken.com>
2
3 * charset.c (load_charset_map_from_file)
4 (load_charset_map_from_vector): Zero out allocated
5 charset_map_entries before using them.
6
72010-02-27 Andreas Schwab <schwab@linux-m68k.org>
8
9 * w32uniscribe.c (uniscribe_check_otf): Fix length check.
10
12010-02-27 Chong Yidong <cyd@stupidchicken.com> 112010-02-27 Chong Yidong <cyd@stupidchicken.com>
2 12
3 * font.c (font_parse_fcname): Recognize "Book", "Condensed", 13 * font.c (font_parse_fcname): Recognize "Book", "Condensed",
diff --git a/src/charset.c b/src/charset.c
index 1db9ec17ae7..125c9131687 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -531,6 +531,7 @@ load_charset_map_from_file (charset, mapfile, control_flag)
531 SAFE_ALLOCA (head, struct charset_map_entries *, 531 SAFE_ALLOCA (head, struct charset_map_entries *,
532 sizeof (struct charset_map_entries)); 532 sizeof (struct charset_map_entries));
533 entries = head; 533 entries = head;
534 bzero (entries, sizeof (struct charset_map_entries));
534 535
535 n_entries = 0; 536 n_entries = 0;
536 eof = 0; 537 eof = 0;
@@ -557,6 +558,7 @@ load_charset_map_from_file (charset, mapfile, control_flag)
557 SAFE_ALLOCA (entries->next, struct charset_map_entries *, 558 SAFE_ALLOCA (entries->next, struct charset_map_entries *,
558 sizeof (struct charset_map_entries)); 559 sizeof (struct charset_map_entries));
559 entries = entries->next; 560 entries = entries->next;
561 bzero (entries, sizeof (struct charset_map_entries));
560 } 562 }
561 idx = n_entries % 0x10000; 563 idx = n_entries % 0x10000;
562 entries->entry[idx].from = from; 564 entries->entry[idx].from = from;
@@ -596,6 +598,7 @@ load_charset_map_from_vector (charset, vec, control_flag)
596 SAFE_ALLOCA (head, struct charset_map_entries *, 598 SAFE_ALLOCA (head, struct charset_map_entries *,
597 sizeof (struct charset_map_entries)); 599 sizeof (struct charset_map_entries));
598 entries = head; 600 entries = head;
601 bzero (entries, sizeof (struct charset_map_entries));
599 602
600 n_entries = 0; 603 n_entries = 0;
601 for (i = 0; i < len; i += 2) 604 for (i = 0; i < len; i += 2)
@@ -632,6 +635,7 @@ load_charset_map_from_vector (charset, vec, control_flag)
632 SAFE_ALLOCA (entries->next, struct charset_map_entries *, 635 SAFE_ALLOCA (entries->next, struct charset_map_entries *,
633 sizeof (struct charset_map_entries)); 636 sizeof (struct charset_map_entries));
634 entries = entries->next; 637 entries = entries->next;
638 bzero (entries, sizeof (struct charset_map_entries));
635 } 639 }
636 idx = n_entries % 0x10000; 640 idx = n_entries % 0x10000;
637 entries->entry[idx].from = from; 641 entries->entry[idx].from = from;
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index f2bd0f44b50..cfdf629ceee 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -666,7 +666,7 @@ int uniscribe_check_otf (font, otf_spec)
666 struct gcpro gcpro1; 666 struct gcpro gcpro1;
667 667
668 /* Check the spec is in the right format. */ 668 /* Check the spec is in the right format. */
669 if (!CONSP (otf_spec) || Flength (otf_spec) < 3) 669 if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3)
670 return 0; 670 return 0;
671 671
672 /* Break otf_spec into its components. */ 672 /* Break otf_spec into its components. */