diff options
| author | Paul Eggert | 2011-06-06 11:36:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-06 11:36:36 -0700 |
| commit | 0c1477cd00313d6aa13c40550a0b413a01d188c6 (patch) | |
| tree | fecfa94a4e32d8bbe5d7c62f38ccbbc030bbe4ac /src/alloc.c | |
| parent | d6d100dd7c48e124ca9ce4bbb761f24b8e052493 (diff) | |
| parent | 695e5b41ac15af4bcd635606db86995900617057 (diff) | |
| download | emacs-0c1477cd00313d6aa13c40550a0b413a01d188c6.tar.gz emacs-0c1477cd00313d6aa13c40550a0b413a01d188c6.zip | |
Merge: Cons<->int and similar integer overflow fixes.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 453286836fd..cfbb79b2e61 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2204,7 +2204,7 @@ INIT must be an integer that represents a character. */) | |||
| 2204 | int len = CHAR_STRING (c, str); | 2204 | int len = CHAR_STRING (c, str); |
| 2205 | EMACS_INT string_len = XINT (length); | 2205 | EMACS_INT string_len = XINT (length); |
| 2206 | 2206 | ||
| 2207 | if (string_len > MOST_POSITIVE_FIXNUM / len) | 2207 | if (string_len > STRING_BYTES_MAX / len) |
| 2208 | string_overflow (); | 2208 | string_overflow (); |
| 2209 | nbytes = len * string_len; | 2209 | nbytes = len * string_len; |
| 2210 | val = make_uninit_multibyte_string (string_len, nbytes); | 2210 | val = make_uninit_multibyte_string (string_len, nbytes); |