1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-19 20:30:29 -08:00

Set members of the struct coding_system before accessing them (bug#9910,9911,9912).

This commit is contained in:
Kenichi Handa 2011-11-07 10:57:07 +09:00
parent 56c31147dc
commit a0241d014e
4 changed files with 14 additions and 1 deletions

View file

@ -1043,7 +1043,7 @@ coding_set_destination (struct coding_system *coding)
{
if (BUFFERP (coding->dst_object))
{
if (coding->src_pos < 0)
if (BUFFERP (coding->src_object) && coding->src_pos < 0)
{
coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE;
coding->dst_bytes = (GAP_END_ADDR