]> git.meshlink.io Git - utcp/commit
Ensure buf->offset is always smaller than buf->size.
authorGuus Sliepen <guus@sliepen.org>
Thu, 14 May 2020 21:44:38 +0000 (23:44 +0200)
committerGuus Sliepen <guus@sliepen.org>
Thu, 14 May 2020 21:44:38 +0000 (23:44 +0200)
commita4a40a3d8b3b8e62853823afa34e6f4a0b40c1de
tree028ab0163a9e037bd30f476f755d65c13622a11b
parent4f6345726724732b564dd55b20ecb3e20a127bd0
Ensure buf->offset is always smaller than buf->size.

Before we allowed buf->offset to be equal to buf->size. This caused an
issue where buffer_call() would call the callback twice, once for 0 bytes
at the end of the buffer, and once for len bytes at the start of the buffer.
This would cause the callback function to think the channel had encountered
an error.
utcp.c