neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/15948 )

Change subject: MNCC: add optional SDP to the socket protocol
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c
File src/libmsc/mncc.c:

https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c@266
PS1, Line 266:           * char sdp[] starts with a '\0'. */
> I'd better don't rely on msgb being zero-filled and mark the related byte = 0.
but msgb_alloc_c() has:

        /* Manually zero-initialize allocated memory */
        memset(msg, 0x00, sizeof(*msg) + size);

So why, are you aiming at future alternative msgb implementations?

To write a '\0' to a msgb's unused data part, we would have to manually check 
that we're not writing past the allocated mem. I'd rather not dup that 
validation out of msgb.c...

Ah ok, I could msgb_put_u8() and then remove that again.

But seems unnecessary?

Plus I'd rather not modify the msgb we got from incoming data, as a sane 
premise.



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7
Gerrit-Change-Number: 15948
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Mon, 04 Nov 2019 15:05:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to