Re: SIGSEGV in libedit

2019-08-05 Thread YASUOKA Masahiko
On Mon, 05 Aug 2019 07:10:01 -0600 "Todd C. Miller" wrote: > On Mon, 05 Aug 2019 17:31:51 +0900, YASUOKA Masahiko wrote: > >> The diff basically is to do the same thing which is done on the >> upstream, but it also replaces h_malloc() and tok_malloc() which the >> upstream didn't replace yet. >

Re: SIGSEGV in libedit

2019-08-05 Thread Todd C . Miller
On Mon, 05 Aug 2019 17:31:51 +0900, YASUOKA Masahiko wrote: > The diff basically is to do the same thing which is done on the > upstream, but it also replaces h_malloc() and tok_malloc() which the > upstream didn't replace yet. This only changes the reallocarray(3) calls that don't actually

Re: SIGSEGV in libedit

2019-08-05 Thread Ingo Schwarze
Hello Yasuoka-san, YASUOKA Masahiko wrote on Mon, Aug 05, 2019 at 04:20:41PM +0900: > This is the diff which fixes the problem by replacing malloc by calloc. > > Initialize the line buffer by zero when allocation. This fixes the > problem a crash happens after the window size change.

Re: SIGSEGV in libedit

2019-08-05 Thread YASUOKA Masahiko
Hi, On Thu, 1 Aug 2019 18:02:41 +0200 Ingo Schwarze wrote: > YASUOKA Masahiko wrote on Thu, Aug 01, 2019 at 08:42:35PM +0900: >> I noticed the upstream NetBSD recently replaced almost all malloc(3)s >> by calloc(3) in libedit. >> >>

Re: SIGSEGV in libedit

2019-08-05 Thread YASUOKA Masahiko
Hi, On Thu, 1 Aug 2019 18:02:41 +0200 Ingo Schwarze wrote: > YASUOKA Masahiko wrote on Thu, Aug 01, 2019 at 08:42:35PM +0900: >> I noticed the upstream NetBSD recently replaced almost all malloc(3)s >> by calloc(3) in libedit. >> >>

Re: SIGSEGV in libedit

2019-08-01 Thread Theo de Raadt
> So i think for committing to OpenBSD, each function changed needs > to be inspected and it needs to be confirmed that zeroing each > buffer in question does not cause new problems or hide other > bugs. Good grief. That's very much like saying some of the strcpy functions in the tree were fine.

Re: SIGSEGV in libedit

2019-08-01 Thread Ingo Schwarze
Hello Yasuoka-san, YASUOKA Masahiko wrote on Thu, Aug 01, 2019 at 08:42:35PM +0900: > I noticed the upstream NetBSD recently replaced almost all malloc(3)s > by calloc(3) in libedit. > > https://github.com/NetBSD/src/commit/b91b3c48e0edb116bd797586430cb426b575d717 > > This also fixes the

Re: SIGSEGV in libedit

2019-08-01 Thread YASUOKA Masahiko
Hi, I noticed the upstream NetBSD recently replaced almost all malloc(3)s by calloc(3) in libedit. https://github.com/NetBSD/src/commit/b91b3c48e0edb116bd797586430cb426b575d717 This also fixes the problem. I'll create a diff which does the same thing. On Thu, 01 Aug 2019 14:54:20 +0900

SIGSEGV in libedit

2019-07-31 Thread YASUOKA Masahiko
Hi, Programs using libedit(3) crashe after the program's window size is changed. For example, 1. Invoke ftp $ ftp ftp> 2. Resize its window 3. Enter "deb" + => When the problem occurs, it crashes with a segmentation fault => The problem doesn't occur, it displays