mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-28 09:09:13 +01:00
Fix OOB in hb-shape
This commit is contained in:
1 parent
8d2781d692
commit
27c36af411
1 file changed
+1
-1
+1
-1
@@ -631,7 +631,7 @@ text_options_t::get_line (unsigned int *len)
|
||||
char buf[BUFSIZ];
|
||||
while (fgets (buf, sizeof (buf), fp)) {
|
||||
unsigned int bytes = strlen (buf);
|
||||
if (buf[bytes - 1] == '\n') {
|
||||
if (bytes && buf[bytes - 1] == '\n') {
|
||||
bytes--;
|
||||
g_string_append_len (gs, buf, bytes);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user