[MERGED] libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged. Change subject: TLVP_PRESENT() should not return TRUE after tlv_parse() fails. .. TLVP_PRESENT() should not return TRUE after tlv_parse() fails. If the length provided i

libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-12 Thread Harald Welte
Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dda6938e1650b4bcaac45809a4763f86f5a9794 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Ger

libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-09 Thread Stefan Sperling
Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5689/3/src/gsm/tlv_parser.c File src/gsm/tlv_parser.c: Line 230: * \returns number of bytes consumed by the TLV entry / IE parsed > Agreed. See patchset 3. I meant patchset 4. -- To view, visit https://gerrit.osmocom.org/5689 To unsub

libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-09 Thread Stefan Sperling
Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5689/3/src/gsm/tlv_parser.c File src/gsm/tlv_parser.c: Line 230: * \returns number of bytes consumed by the TLV entry / IE parsed > It may be worth documenting in here that it can returns a negative value. A Agreed. See patchset 3. --

[PATCH] libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-09 Thread Stefan Sperling
Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5689 to look at the new patch set (#4). TLVP_PRESENT() should not return TRUE after tlv_parse() fails. If the length provided in the patcket exceeds the buffer length, tlv_par

libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-09 Thread Pau Espin Pedrol
Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5689/3/src/gsm/tlv_parser.c File src/gsm/tlv_parser.c: Line 230: * \returns number of bytes consumed by the TLV entry / IE parsed It may be worth documenting in here that it can returns a negative value. A reason users of this function

libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-08 Thread Neels Hofmeyr
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5689 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dda6938e1650b4bcaac45809a4763f86f5a9794 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Ger

[PATCH] libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-08 Thread Stefan Sperling
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5689 to look at the new patch set (#3). TLVP_PRESENT() should not return TRUE after tlv_parse() fails. If the length provided in the patcket exceeds the buffer length, tlv_parse() returns -2

[PATCH] libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-08 Thread Stefan Sperling
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5689 to look at the new patch set (#2). TLVP_PRESENT() should not return TRUE after tlv_parse() fails. If the length provided in the patcket exceeds the buffer length, tlv_parse() returns -2

[PATCH] libosmocore[master]: TLVP_PRESENT() should not return TRUE after tlv_parse() fails.

2018-01-08 Thread Stefan Sperling
Review at https://gerrit.osmocom.org/5689 TLVP_PRESENT() should not return TRUE after tlv_parse() fails. If the length provided in the patcket exceeds the buffer length, tlv_parse() returns -2 but leaves tlv.val and tlv.len initializd. Many callers of tlv_parse() do not check its return value,