Commit 7bcb223
comp.c: Add defensive code if src buffer is empty/null (libssh2#1813)
If `src` is NULL a 25 byte buffer is still allocated and returned but
with a length of zero and no error. This causes error handling to be a
bit tricky on the other side of this call so we should clean up on this
side and return an error.
Reviewed:
Michael Buckley
Co-authored-by: Will Cosgrove <will@everydaysoftware.net>1 parent 704299e commit 7bcb223
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| |||
0 commit comments