Commit 0a5f7fb
FreeRTOS_TCP_Transmission_IPv4,6(): Move deref behind nullptr check (#1137)
Fix a possible null pointer derefernce:
The pointer returned by pxDuplicateNetworkBufferWithDescriptor()
was being dereferenced outside its null checks.
This could only happen if ipconfigZERO_COPY_TX_DRIVER was enabled.
Conveniently, the statement that used the pointer could be moved
into the scope of the null check.
Co-authored-by: Andreas Nordal <andreas.nordal@zivid.com>1 parent a53e71a commit 0a5f7fb
File tree
2 files changed
+13
-12
lines changed- source
2 files changed
+13
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 144 | | |
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
153 | 148 | | |
154 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 150 | | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
162 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
0 commit comments