In case the control interface on TCP port 4249 is used in an unintended way,
a SIGABRT can be caused because of a missing initialization of a msgb*.
The upcoming patch fixes this bug.
If the patch seems useful, please feel free to merge it.
Kind regards,
-Alexander Huemer
Alexander Huemer(1):
libctrl: only free() msgb if it was alloc()ed
openbsc/src/libctrl/control_if.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Show replies by date
Before this patch a SIGABRT was caused when doing e.g.:
$ ncat 127.0.0.1 4249
^C
---
openbsc/src/libctrl/control_if.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index 8198ae6..d081342 100644
--- a/openbsc/src/libctrl/control_if.c
+++ b/openbsc/src/libctrl/control_if.c
@@ -208,7 +208,7 @@ static int handle_control_read(struct osmo_fd * bfd)
struct ctrl_connection *ccon;
struct ipaccess_head *iph;
struct ipaccess_head_ext *iph_ext;
- struct msgb *msg;
+ struct msgb *msg = NULL;
struct ctrl_cmd *cmd;
struct ctrl_handle *ctrl = bfd->data;
--
1.7.7