Patch Set 4: Code-Review-1 (2 comments)
https://gerrit.osmocom.org/#/c/5438/4/src/ctrl/control_cmd.c File src/ctrl/control_cmd.c: Line 284: static bool id_str_valid(const char *str) Are we absolutely sure that all current and future users of this function always use null-terminated strings only? Line 296: struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) We take msgb as input so we know the length of data to process. This means we can pass it to id_str_valid() explicitly instead of hoping that we won't forget to null-terminate the input to it one day. -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: Harald Welte <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max <[email protected]> Gerrit-HasComments: Yes
