Stefan Sperling has posted comments on this change. ( https://gerrit.osmocom.org/10054 )
Change subject: fix unaligned access in build_ipcp_pco() ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/10054/1/ggsn/ggsn.c File ggsn/ggsn.c: https://gerrit.osmocom.org/#/c/10054/1/ggsn/ggsn.c@426 PS1, Line 426: cur_opt += OSMO_MAX(len, 2); > would probably make sense to return NULL and print an error if len==0 is > found. […] Length 0 and 1 make no sense because the value includes type and length field (2 bytes). I am not sure if we should stop looking for valid options if length zero or one is encountered in one of the options. "Be liberal in what you accept" probably applies. https://gerrit.osmocom.org/#/c/10054/1/ggsn/ggsn.c@522 PS1, Line 522: remain = ARRAY_SIZE(pdp->pco_req.v) - consumed; > why array size? isn't that in elements? I think we want to count bytes here, > so sizeof() makes more […] Yes, indeed, we want to use sizeof here. -- To view, visit https://gerrit.osmocom.org/10054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia1410abb216831864042f95679330f4508e1af3d Gerrit-Change-Number: 10054 Gerrit-PatchSet: 1 Gerrit-Owner: Stefan Sperling <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Stefan Sperling <[email protected]> Gerrit-CC: Pau Espin Pedrol <[email protected]> Gerrit-Comment-Date: Thu, 19 Jul 2018 16:36:40 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No
