summaryrefslogtreecommitdiff
path: root/src/encoding.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2022-04-11 13:10:29 +0000
committerChristos Zoulas <christos@zoulas.com>2022-04-11 13:10:29 +0000
commita7cf2e446cb1d337e5287d8d6d23a72924a27a03 (patch)
tree85d16c191cf6631dfa8ceae11f4112e1325a002d /src/encoding.c
parent622ff02aedae35d0113029f466a9d00d3b92decc (diff)
downloadfile-git-a7cf2e446cb1d337e5287d8d6d23a72924a27a03.tar.gz
use unsigned for holding the hi part of the surrogate pair
(found by clusterfuzz)
Diffstat (limited to 'src/encoding.c')
-rw-r--r--src/encoding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoding.c b/src/encoding.c
index cf034c0f..516cabd5 100644
--- a/src/encoding.c
+++ b/src/encoding.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: encoding.c,v 1.34 2022/04/04 16:45:36 christos Exp $")
+FILE_RCSID("@(#)$File: encoding.c,v 1.35 2022/04/11 13:10:29 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -466,7 +466,8 @@ private int
looks_ucs16(const unsigned char *bf, size_t nbytes, file_unichar_t *ubf,
size_t *ulen)
{
- int bigend, hi;
+ int bigend;
+ uint32_t hi;
size_t i;
if (nbytes < 2)