A forwarded message from Leonardo Taccari <[email protected]> is below.
The list software dropped it because he's not a subscriber.
His patch is attached, and it looks like a straightforward fix to me.
I will apply it.
-- Chris
-- BEGIN FORWARDED MESSAGE --
Dear edbrowse community,
I've noticed that a possible NULL pointer dereference can occours in
inputLine() function defined in src/buffers.c (I have builded edbrowse
on NetBSD and readline(3) API is provided by editline(3) but probably
it also happens directly via readline(3), altough I've not tested the
later case).
In order to reproduce the issue (where ^D is the EOF character, usually
typed via CTRL-d):
$ edbrowse
rl
^D
The attached patch in this email should fix this issue.
PS: if further information is needed please cc: me as I am not
subscribed to this ML.
$NetBSD$
Avoid possible NULL dereference typing a line with just an EOF character
(typically via ^D).
--- src/buffers.c.orig 2015-12-26 19:31:45.000000000 +0000
+++ src/buffers.c
@@ -408,7 +408,7 @@ dotimers:
if (inputReadLine && isInteractive) {
last_rl = readline("");
- if (*last_rl)
+ if ((last_rl != NULL) && *last_rl)
add_history(last_rl);
s = (uchar *) last_rl;
} else {
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev