)]}'
{
  "commit": "287954c9c57412042a375f5ef2d341904627f61e",
  "tree": "27f9934dcdcb7560efddc7ce9ea04de63cf282ef",
  "parents": [
    "488e98dd8c001d1317b683ae5c29e2f94a4a8438"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Oct 30 16:51:56 2026 -0600"
  },
  "committer": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Mon Nov 09 21:34:03 2026 -0600"
  },
  "message": "[gvar] Charge tuple region eval and point-number decoding to work budget\n\napply_deltas_to_points() only charged the glyph work budget\n(HB_BUDGET_GLYPH) for tuple variations that actually applied, and\nonly by the glyph\u0027s point count, after calculate_scalar() had\nalready walked gvar.axisCount axes for every tuple header.  A\n~35 KB font with axisCount 8192 and 4095 non-applying tuples on a\ncomposite-multiplied glyph could hold one hb_font_get_glyph_extents()\ncall for over a minute while using ~3% of the budget.  Two further\npieces of work were also uncharged: the shared point-number list is\ndecoded on every glyph load, and an applied tuple decodes/applies\nindices.length deltas, which can exceed the point count charged.\n\nFollowing the project\u0027s \"charge before doing the work\" idiom\n(#6256, #6410), charge 1 + axisCount per tuple before its region is\nevaluated (bounding calculate_scalar() regardless of the scalar\ncache or outcome), shared_indices.length once per load after the\nshared point numbers are decoded, and indices.length per applied\ntuple before its deltas are decoded.  A font whose tuple work\nexceeds the budget now fails the glyph load (outline/extents return\nfalse) instead of finishing slowly; real fonts (a dozen axes, tens\nof tuples) pay a few hundred units per load.\n\nAdds test_hb_draw_gvar_budget to test/api/test-draw.c covering both\nthe unapplied-tuple region charge and the point-number charges.\n\nDiscovered by Anthropic\u0027s OSS Scanner, as vulnerability ANT-2026-S2OJWJHX.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8316cf18db5f66288a2f0917eb0aba9eb447c6f9",
      "old_mode": 33188,
      "old_path": "src/hb-ot-var-gvar-table.hh",
      "new_id": "2ae6affe4a81d811e49cd20d5a51a24d7b2a48cb",
      "new_mode": 33188,
      "new_path": "src/hb-ot-var-gvar-table.hh"
    },
    {
      "type": "modify",
      "old_id": "25df3b8af1a7fb87904b5db01f047005428ed6ba",
      "old_mode": 33188,
      "old_path": "test/api/test-draw.c",
      "new_id": "aea1e904b4060fe3a7c3de9c1e247645983fbcad",
      "new_mode": 33188,
      "new_path": "test/api/test-draw.c"
    }
  ]
}
