diff options
| author | Paul Eggert | 2011-06-19 11:44:09 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-19 11:44:09 -0700 |
| commit | 1bfdaf108fd83f2c673a50eb069e29556e2e3ca6 (patch) | |
| tree | f75ca0ef523b6785ef15338b75896e5a56e16878 /src/coding.c | |
| parent | 35016e9a4e2fe3b60cbadd94a1a2feaed8aa1484 (diff) | |
| download | emacs-1bfdaf108fd83f2c673a50eb069e29556e2e3ca6.tar.gz emacs-1bfdaf108fd83f2c673a50eb069e29556e2e3ca6.zip | |
* coding.c (make_subsidiaries): Don't assume string length fits in int.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index 04985ab3c74..9939774ea82 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9442,7 +9442,7 @@ static Lisp_Object | |||
| 9442 | make_subsidiaries (Lisp_Object base) | 9442 | make_subsidiaries (Lisp_Object base) |
| 9443 | { | 9443 | { |
| 9444 | Lisp_Object subsidiaries; | 9444 | Lisp_Object subsidiaries; |
| 9445 | int base_name_len = SBYTES (SYMBOL_NAME (base)); | 9445 | ptrdiff_t base_name_len = SBYTES (SYMBOL_NAME (base)); |
| 9446 | char *buf = (char *) alloca (base_name_len + 6); | 9446 | char *buf = (char *) alloca (base_name_len + 6); |
| 9447 | int i; | 9447 | int i; |
| 9448 | 9448 | ||
| @@ -9450,7 +9450,7 @@ make_subsidiaries (Lisp_Object base) | |||
| 9450 | subsidiaries = Fmake_vector (make_number (3), Qnil); | 9450 | subsidiaries = Fmake_vector (make_number (3), Qnil); |
| 9451 | for (i = 0; i < 3; i++) | 9451 | for (i = 0; i < 3; i++) |
| 9452 | { | 9452 | { |
| 9453 | memcpy (buf + base_name_len, suffixes[i], strlen (suffixes[i]) + 1); | 9453 | strcpy (buf + base_name_len, suffixes[i]); |
| 9454 | ASET (subsidiaries, i, intern (buf)); | 9454 | ASET (subsidiaries, i, intern (buf)); |
| 9455 | } | 9455 | } |
| 9456 | return subsidiaries; | 9456 | return subsidiaries; |