kee

Offline IOU signer with QR as transport
git clone https://holbrook.no/src/kee
Info | Log | Files | Refs | README | LICENSE

commit 16c20e6b722caba35cf3c41d796f7bd316a46b59
parent 639befd4555da2ba63a05c28b14c3e212c3c1b85
Author: lash <dev@holbrook.no>
Date:   Thu,  2 May 2024 12:01:47 +0100

Fix length bug in transport import

Diffstat:
Msrc/transport.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/transport.c b/src/transport.c @@ -267,7 +267,8 @@ int kee_transport_read(struct kee_transport_t *trans, char *out, size_t *out_len /// \todo handle this crop better, should not require any of these copies *trans->cmd = *out; memcpy(trans->data, out+1, *out_len); - memcpy(out, trans->data, (*out_len)-1); + (*out_len)--; + memcpy(out, trans->data, *out_len); } return ERR_OK;