From bdfb52410ccf824e8652b42a3b95a801b1164196 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 5 Oct 2015 14:18:56 -0700 Subject: [PATCH] text-freetype2: Fix serialized variable size This variable needs to be the same size for both architectures. size_t is 8 on 64bit and 4 on 32bit. --- plugins/text-freetype2/find-font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/text-freetype2/find-font.c b/plugins/text-freetype2/find-font.c index 888cb1b83..d9e77506c 100644 --- a/plugins/text-freetype2/find-font.c +++ b/plugins/text-freetype2/find-font.c @@ -22,7 +22,7 @@ static inline bool write_data(struct serializer *s, const void *data, static bool read_str(struct serializer *s, char **p_str) { - size_t size; + uint32_t size; char *str; if (!read_var(s, size)) @@ -41,7 +41,7 @@ static bool read_str(struct serializer *s, char **p_str) static bool write_str(struct serializer *s, const char *str) { - size_t size = str ? strlen(str) : 0; + uint32_t size = (uint32_t)(str ? strlen(str) : 0); if (!write_var(s, size)) return false;