summaryrefslogtreecommitdiff
path: root/src/libunixonacid/textmessage_put.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-12-22 14:46:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-12-22 14:46:04 +0000
commit3c1ff1523587881324fc540fece06412c29c66de (patch)
treeecd5431551ebe81793a33297b86f26d90e12047a /src/libunixonacid/textmessage_put.c
parentf3c9c3c70187967a670f1c059f5461dce745d92e (diff)
downloadskalibs-3c1ff1523587881324fc540fece06412c29c66de.tar.xz
Add textclient, fix some textmessage issues
Diffstat (limited to 'src/libunixonacid/textmessage_put.c')
-rw-r--r--src/libunixonacid/textmessage_put.c2
1 files changed, 1 insertions, 1 deletions
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) ;
}