lynxis lazus has submitted this change and it was merged. (
https://gerrit.osmocom.org/10032 )
Change subject: vty: initialize termios before using it
......................................................................
vty: initialize termios before using it
valgrind complains about using unitialised bytes in syscalls.
I could imagine this happens when tcgetattr fails to set termios.
Change-Id: I9d165911fa3127afa8f836fa5c5c2e14a949474a
---
M src/vty/vty.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/vty/vty.c b/src/vty/vty.c
index 08258e7..6ca7a15 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1506,7 +1506,7 @@
{
struct vty *vty;
- struct termios t;
+ struct termios t = {};
tcgetattr(vty_sock, &t);
cfmakeraw(&t);
--
To view, visit https://gerrit.osmocom.org/10032
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d165911fa3127afa8f836fa5c5c2e14a949474a
Gerrit-Change-Number: 10032
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>