Fix OOB in hb-shape
diff --git a/util/options.cc b/util/options.cc index 5ded644..6585eb4 100644 --- a/util/options.cc +++ b/util/options.cc
@@ -631,7 +631,7 @@ 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;