[HarfBuzz] infinite loops in hb_ot_tag_from_language()

Behdad Esfahbod behdad at behdad.org
Tue Oct 12 09:36:43 PDT 2010


I knew I need to write tests when I was writing that code...

Anyway, fixed.  Thanks.

And I changed the repo location.  Sending separate message about that.

behdad

On 10/12/10 06:45, Jonathan Kew wrote:
> Hi Behdad,
> 
> There are a couple of infinite loops (they fail to increment the counter variable) in hb_ot_tag_from_language(), in the "x-hbot..." case:
> 
>     while (i < 4 && IS_LETTER (lang_str[i])) {
>       tag[i] = TO_UPPER (lang_str[i]);
>     }
>     while (i < 4)
>       tag[i] = ' ';
> 
> Neither of these loops will ever terminate!
> 
> See https://bugzilla.mozilla.org/show_bug.cgi?id=603352. (Reported by timeless.)
> 
> JK
> 
> 



More information about the HarfBuzz mailing list