Closed pesco closed 7 years ago
the line
ptr = memchr(text + i, '\n', total_len);
will access memory after the text buffer as i is incremented but total_len stays constant. the loop will only terminate when it hits an area of memory of size total_len that incidentally contains no newline.
text
i
total_len
The ota code was buggy and completely unreadable; tried to make it bug-free and readable again:
https://github.com/SHA2017-badge/Firmware/pull/205
@pesco This file has largely been rewritten. Can I close this issue?
If the code in question no longer exists, sure.
the line
will access memory after the
text
buffer asi
is incremented buttotal_len
stays constant. the loop will only terminate when it hits an area of memory of sizetotal_len
that incidentally contains no newline.