Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:41c9f2bbeeb2, committed 2015-07-22
- Comitter:
- glansberry
- Date:
- Wed Jul 22 21:34:08 2015 -0400
- Parent:
- 2:64fdac5efaa1
- Commit message:
- Fix bug causeing always fail
Changed in this revision
COBS.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/COBS.cpp Tue Jul 21 19:31:41 2015 -0400 +++ b/COBS.cpp Wed Jul 22 21:34:08 2015 -0400 @@ -57,7 +57,7 @@ while (ptr < end) { int i, code = *ptr++; - if (ptr+code > end) return 1; //if we will overun the end of the buffer exit + if (ptr+code-1 > end) return 1; //if we will overun the end of the buffer exit //this is most likely to happen when decoding a malformed message for (i=1; i<code; i++) *dst++ = *ptr++; if (code < 0xFF) *dst++ = 0;