]> git.ipfire.org Git - thirdparty/curl.git/commit
examples: fix two issues found by CodeQL
authorViktor Szakats <commit@vsz.me>
Thu, 18 Sep 2025 16:50:09 +0000 (18:50 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 18 Sep 2025 18:14:21 +0000 (20:14 +0200)
commitf13250edf11312ab8c0425cf39b182a31b53c6f7
tree0d667534495db76845f44639651033cbffa58abc
parentce354d0f4d251371f65f1770d95bba1d926de421
examples: fix two issues found by CodeQL

- http2-upload: use `fstat()` to query file length to fix TOCTOU.

- ftpuploadresume: fix checking `sscanf()` return value.

Follow-up to b4922b1295333dc6679eb1d588ddc2fb6b7fd5b7 #18564
Closes #18605
docs/examples/ftpuploadresume.c
docs/examples/http2-upload.c