From 3c1ff1523587881324fc540fece06412c29c66de Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 22 Dec 2017 14:46:04 +0000 Subject: Add textclient, fix some textmessage issues --- src/libunixonacid/textmessage_put.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libunixonacid/textmessage_put.c') diff --git a/src/libunixonacid/textmessage_put.c b/src/libunixonacid/textmessage_put.c index a6eb6ca..5b7d944 100644 --- a/src/libunixonacid/textmessage_put.c +++ b/src/libunixonacid/textmessage_put.c @@ -15,7 +15,7 @@ int textmessage_put (textmessage_sender_t *ts, char const *s, size_t len) { .iov_base = pack, .iov_len = 4 }, { .iov_base = (char *)s, .iov_len = len } } ; - if (len > UINT32_MAX) return (errno = EINVAL, 0) ; + if (len > TEXTMESSAGE_MAXLEN) return (errno = EINVAL, 0) ; uint32_pack_big(pack, (uint32_t)len) ; return bufalloc_putv(&ts->out, v, 2) ; } -- cgit v1.2.3