Commit 6eced09c authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(decode_coding_emacs_mule): Handle insufficent source correctly.

parent 4f918f60
2004-03-09 Kenichi Handa <handa@etlken2>
* coding.c (decode_coding_emacs_mule): Handle insufficent source
correctly.
2004-03-04 Richard M. Stallman <rms@gnu.org>
* s/sol2-6.h (LD_SWITCH_SYSTEM_TEMACS): New definition.
......
......@@ -1024,9 +1024,26 @@ decode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes)
}
else
{
bytes = CHAR_STRING (*src, tmp);
p = tmp;
int i, c;
bytes = BYTES_BY_CHAR_HEAD (*src);
src++;
for (i = 1; i < bytes; i++)
{
ONE_MORE_BYTE (c);
if (CHAR_HEAD_P (c))
break;
}
if (i < bytes)
{
bytes = CHAR_STRING (*src_base, tmp);
p = tmp;
src = src_base + 1;
}
else
{
p = src_base;
}
}
if (dst + bytes >= (dst_bytes ? dst_end : src))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment