src/hb-common.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 48360ec03b225dfec5f90bc5cb93122203d2dd6b Author: Behdad Esfahbod <[email protected]> Date: Thu Sep 26 16:48:42 2013 -0400 Bug 68990 - test-common fails on i686-linux Fix use-after-end-of-scope. diff --git a/src/hb-common.cc b/src/hb-common.cc index 88f7ed1..cf24660 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -292,11 +292,13 @@ retry: hb_language_t hb_language_from_string (const char *str, int len) { + char strbuf[64]; + if (!str || !len || !*str) return HB_LANGUAGE_INVALID; - if (len >= 0) { - char strbuf[64]; + if (len >= 0) + { len = MIN (len, (int) sizeof (strbuf) - 1); str = (char *) memcpy (strbuf, str, len); strbuf[len] = '\0'; _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
