Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13963 )
Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c@1891 PS1, Line 1891: LOG_TRANS_CAT Alternatively, we can make LOG_TRANS() macro NULL-safe: #define LOG_TRANS(trans, level, fmt, args...) do { \ if ((trans) != NULL) \ LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) \ else \ LOGP(DMSC, level, fmt, args...); \ } while (0); or less elegant: #define LOG_TRANS(trans, level, fmt, args...) \ LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/transaction.c File src/libmsc/transaction.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/transaction.c@134 PS1, Line 134: LOG_TRANS_CAT(trans, DMSC, LOGL_ERROR Please see: https://gerrit.osmocom.org/#/c/osmo-msc/+/13974/ -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <[email protected]> Gerrit-Reviewer: Harald Welte <[email protected]> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: tnt <[email protected]> Gerrit-CC: Vadim Yanitskiy <[email protected]> Gerrit-Comment-Date: Fri, 10 May 2019 20:22:42 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No
