Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12453 )

Change subject: refactor ran_conn_get_conn_id()
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12453/1/src/libmsc/ran_conn.c
File src/libmsc/ran_conn.c:

https://gerrit.osmocom.org/#/c/12453/1/src/libmsc/ran_conn.c@512
PS1, Line 512: Truncation should never happen
> Why should we care about it then? […]
I took this from stsp's pattern

  if (strlcpy(...) >= sizeof(buf))

and you're right, snprintf() can return negative.

Why care: if the future changes the string to become too long for some reason, 
be loud about that.



--
To view, visit https://gerrit.osmocom.org/12453
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: I82c022a995c11478201e0faeaf748e74dc38e05f
Gerrit-Change-Number: 12453
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-CC: Harald Welte <[email protected]>
Gerrit-CC: Vadim Yanitskiy <[email protected]>
Gerrit-Comment-Date: Fri, 04 Jan 2019 02:02:28 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to