On Mon, 05 Aug 2019 07:10:01 -0600 "Todd C. Miller" <[email protected]> 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. > > This only changes the reallocarray(3) calls that don't actually > reallocate.
Yes. el_malloc() had been used for them in the original libedit(3). > Shouldn't the other calls that do reallocate the buffer be converted > to recallocarray(3)? Yes. Actually I tried. But I thought it's dangerous since the current size of the buffer is not clear in some places. So if we'll do this, I'd like to do that separately. Also, the upstream also didn't that yet. In https://github.com/NetBSD/src/commit/b91b3c48e0edb116bd797586430cb426b575d717 |XXX: should fix realloc similarly. --yasuoka
