diff options
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 6ccaf354c74..64e8e41a5a1 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1071,8 +1071,8 @@ coding_set_destination (struct coding_system *coding) | |||
| 1071 | static void | 1071 | static void |
| 1072 | coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) | 1072 | coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) |
| 1073 | { | 1073 | { |
| 1074 | if (coding->dst_bytes >= MOST_POSITIVE_FIXNUM - bytes) | 1074 | if (STRING_BYTES_MAX - coding->dst_bytes < bytes) |
| 1075 | error ("Maximum size of buffer or string exceeded"); | 1075 | string_overflow (); |
| 1076 | coding->destination = (unsigned char *) xrealloc (coding->destination, | 1076 | coding->destination = (unsigned char *) xrealloc (coding->destination, |
| 1077 | coding->dst_bytes + bytes); | 1077 | coding->dst_bytes + bytes); |
| 1078 | coding->dst_bytes += bytes; | 1078 | coding->dst_bytes += bytes; |