lwIP - A Lightweight TCP/IP stack - Bugs: bug #62832, Allow NULL buffer to...
You are not allowed to post comments on this tracker with your current authentication level.
bug #62832: Allow NULL buffer to pbuf_get_contiguous()
Submitter: | Colin Foster <colin_foster_ia> | ||
Submitted: | Thu 28 Jul 2022 06:40:23 PM UTC | ||
Category: | pbufs | Severity: | 3 - Normal |
Item Group: | Change Request | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | 2.2.1 |
lwIP version: | git head |
Thu 12 Oct 2023 06:26:20 AM UTC, comment #4: |
Simon Goldschmidt <goldsimon> |
Tue 23 Aug 2022 02:46:04 AM UTC, comment #3: If pbuf_get_contiguous returns null, the caller may mistakenly think that there is not enough data. You can rewrite a new function and let the caller call it according to his own needs. |
wuchangsheng <wuchangsheng> |
Mon 22 Aug 2022 03:24:14 PM UTC, comment #2:
|
Colin Foster <colin_foster_ia> |
Mon 22 Aug 2022 02:53:19 PM UTC, comment #1: When the required data spans more than one pbuf, null is passed in and the data cannot be copied out |
wuchangsheng <wuchangsheng> |
Thu 28 Jul 2022 06:40:23 PM UTC, original submission:
The pbuf_get_contiguous currently requires a non-NULL buffer and a non-zero buffer size:
|
Colin Foster <colin_foster_ia> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-10-12 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
Planned Release | None | 2.2.1 |
Powered by Savane 3.13-758e.
Corresponding source code
Re comment #3: I don't think that's a problem: the caller can always check p->tot_len before (or after) if that's really a problem. And existing users won't pass a NULL pointer.
I think the idea is good. Pushed, thanks for reporting!