[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both
From: |
Dmitry Antipov |
Subject: |
Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected] |
Date: |
Thu, 17 Jan 2013 22:12:24 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
On 01/17/2013 09:50 PM, Eli Zaretskii wrote:
Can you tell which problems you found in the original code that these
changes are supposed to fix?
1) Original code do emacs_read to ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE +
offset
without adjusting gap size, z and zv; this (IIUC) fools make_gap and so
enlarge_buffer_text; we end up with the gap which is less than expected,
read_non_regular do emacs_read into the buffer beyond allocated buffer text,
which finally causes EFAULT from emacs_read or heap corruption.
2) Original code throws I/O error too early without decoding the data possibly
read before. When not-yet-decoded part of buffer text is displayed, redisplay
is likely to crash.
Dmitry
- Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected, Dmitry Antipov, 2013/01/15
- Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected, Eli Zaretskii, 2013/01/15
- Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected, Dmitry Antipov, 2013/01/15
- Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected, Eli Zaretskii, 2013/01/15
- RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Dmitry Antipov, 2013/01/17
- Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Eli Zaretskii, 2013/01/17
- Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected],
Dmitry Antipov <=
- Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Dmitry Antipov, 2013/01/18
- Re: RFC on proposal fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Eli Zaretskii, 2013/01/18
- 24.2.92 fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Dmitry Antipov, 2013/01/21
- Re: 24.2.92 fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Glenn Morris, 2013/01/21
- Re: 24.2.92 fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Dmitry Antipov, 2013/01/21
- Re: 24.2.92 fix [Re: Crash caused by insert-file-contents, both trunk (bzr 111532) and 24.2.92 affected], Stefan Monnier, 2013/01/22