You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): harden jpg_stream_httpd_handler example & fix bugs
Changes:
* Use `%zu` in _STREAM_PART for size_t-safe Content-Length formatting.
* Fix `part_buf` type: `char part_buf[64]` (was array of char pointers).
* initialize local JPEG buffer vars: `jpg_buf_len`/`jpg_buf`
* drop leading underscores on them for consistency with other locals
* Bound `snprintf()` by `sizeof(part_buf)`; capture `int hlen`.
* Detect and log header truncation with required/available sizes; fail gracefully.
* Break out of loop on JPEG compression failure to avoid invalid buffer use.
* Send header chunk only when formatting succeeds.
* Guard FPS calculation against divide-by-zero; compute once as `fps`.
* Remove unsafe/needless pointer cast.
* Minor style cleanups for readability.
0 commit comments