Merge branch 'obsd-master'

pull/2270/head
Thomas Adam 2020-06-02 14:01:17 +01:00
commit 049ccb4a4b
1 changed files with 2 additions and 0 deletions

2
utf8.c
View File

@ -134,6 +134,8 @@ utf8_from_data(const struct utf8_data *ud, utf8_char *uc)
union utf8_map m = { .uc = 0 };
u_int offset;
if (ud->width == 0)
goto fail;
if (ud->width != 1 && ud->width != 2)
fatalx("invalid UTF-8 width");
if (ud->size == 0)