Karlson2k / libmicrohttpd

GNU libmicrohttpd repository unofficial mirror on GitHub
https://www.gnu.org/software/libmicrohttpd/
Other
97 stars 29 forks source link

src/examples/demo{,_https}: fix response buffer overwriting #29

Closed RaidenTaisha closed 4 months ago

RaidenTaisha commented 4 months ago

Due to an unaccounted offset, the header was overwritten by the footer. Adding address offset when copying string.

The code was broken by 5821a7f3 ("src/examples/demo{,_https}: added some error checking, fixed compiler warnings").

Karlson2k commented 4 months ago

Thanks, Andrey. Fixed as suggested.