Bug 540592 – Crash in HB_GSUB_Apply_String with Linux-Libertine font
authorBehdad Esfahbod <behdad@gnome.org>
Sun, 29 Jun 2008 18:30:14 +0000 (18:30 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Sun, 29 Jun 2008 18:30:14 +0000 (18:30 +0000)
2008-06-29  Behdad Esfahbod  <behdad@gnome.org>

        Bug 540592 – Crash in HB_GSUB_Apply_String with Linux-Libertine font

        * pango/opentype/harfbuzz-gsub.c (GSUB_Do_String_Lookup): Fix reverse
        loops for type 8 lookups.

src/harfbuzz-gsub.c

index 30d914a..067122d 100644 (file)
@@ -4218,7 +4218,7 @@ static HB_Error  GSUB_Do_String_Lookup( HB_GSUBHeader* gsub,
        if ( error == HB_Err_Not_Covered )
          buffer->in_pos--;
       }
-      while (buffer->in_pos);
+      while ((HB_Int) buffer->in_pos >= 0);
 
       return retError;