diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-26 08:27:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-26 08:27:04 -0800 |
commit | 5f131a787efcda109e405fe99104626bc912194d (patch) | |
tree | 64b880fc0ea45f0d80fb2134e0eb42718613ae5d /struct.c | |
parent | a712268af12b40874fe3fe142e14b329e42c20e2 (diff) | |
download | txr-5f131a787efcda109e405fe99104626bc912194d.tar.gz txr-5f131a787efcda109e405fe99104626bc912194d.tar.bz2 txr-5f131a787efcda109e405fe99104626bc912194d.zip |
linenoise: defensive null pointer check.
* linenoise/linenoise.c (move_cursor_multiline): If the npos
argument happens to be equal to the current position (the
operation is a null move), then no movement is generated. In
that case, no ab_append operation is called, and ab.b will
stay null; this null pointer then gets passed to
lino_os.puts_fn as the string to output, and that will blow
up. This situation hasn't actually been observed.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions