summaryrefslogtreecommitdiff
path: root/external/harfbuzz/ubsan.patch
blob: fb299316af9d00c68800a989a4efdc13f214cd0e (plain)
1
2
3
4
5
6
7
8
9
10
11
--- src/hb-ot-hmtx-table.hh
+++ src/hb-ot-hmtx-table.hh
@@ -263,7 +263,7 @@ struct hmtxvmtx
           return default_advance;
       }
 
-      return table->longMetric[MIN (glyph, (uint32_t) num_advances - 1)].advance;
+      return static_cast<OT::LongMetric const *>(table->longMetric)[MIN (glyph, (uint32_t) num_advances - 1)].advance;
     }
 
     inline unsigned int get_advance (hb_codepoint_t  glyph,