Repository: incubator-mynewt-core Updated Branches: refs/heads/develop ff2d84e93 -> b3f9b9648
MYNEWT-656; kernel/os - fix memory corruption by os_mbuf_copyinto(). Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/b3f9b964 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b3f9b964 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b3f9b964 Branch: refs/heads/develop Commit: b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e Parents: ff2d84e Author: Marko Kiiskila <[email protected]> Authored: Tue Mar 7 13:35:32 2017 -0800 Committer: Marko Kiiskila <[email protected]> Committed: Tue Mar 7 13:35:32 2017 -0800 ---------------------------------------------------------------------- kernel/os/src/os_mbuf.c | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b3f9b964/kernel/os/src/os_mbuf.c ---------------------------------------------------------------------- diff --git a/kernel/os/src/os_mbuf.c b/kernel/os/src/os_mbuf.c index 28dec0b..7888a86 100644 --- a/kernel/os/src/os_mbuf.c +++ b/kernel/os/src/os_mbuf.c @@ -1086,6 +1086,7 @@ os_mbuf_copyinto(struct os_mbuf *om, int off, const void *src, int len) } cur = next; + cur_off = 0; } /* Append the remaining data to the end of the chain. */
