Closed jmjatlanta closed 6 years ago
This shows up on macOS 10.13 (and maybe others).
https://github.com/troglobit/editline/blob/534b3897b82f2ecb3a9e46272b00a50299972001/src/editline.c#L178-L182
I believe the realloc should happen before the character is added to the array. Once I made that change, the SIGSEV went away.
Note: The array of items to display had 122 entries, longest 46 (3 columns).
Update: After taking another look, changing the > to a >= will do the trick.
>
>=
Thank you for reporting, and fixing, this! :)
This shows up on macOS 10.13 (and maybe others).
https://github.com/troglobit/editline/blob/534b3897b82f2ecb3a9e46272b00a50299972001/src/editline.c#L178-L182
I believe the realloc should happen before the character is added to the array. Once I made that change, the SIGSEV went away.
Note: The array of items to display had 122 entries, longest 46 (3 columns).
Update: After taking another look, changing the
>
to a>=
will do the trick.