summaryrefslogtreecommitdiff
path: root/src/poparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/poparser.c')
-rw-r--r--src/poparser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poparser.c b/src/poparser.c
index 75f2b0f..7f87776 100644
--- a/src/poparser.c
+++ b/src/poparser.c
@@ -56,7 +56,7 @@ static inline enum po_error poparser_feed_hdr(struct po_parser *p, po_message_t
if ((x = strstr(msg->str[0], "charset="))) {
for (y = x; *y && !isspace(*y); y++);
- if ((y-x-8) > sizeof(p->hdr.charset))
+ if ((unsigned)(y-x-7) > sizeof(p->hdr.charset))
return -po_unsupported_charset;
memcpy(p->hdr.charset, x+8, y-x-8);