)]}'
{
  "commit": "3fff90528ddff11f081f4536474bc42612134b21",
  "tree": "512742735c804d4d8dbff3fd79b88448cf5ac6ca",
  "parents": [
    "9df939b153d88956a22dfb30a9868d1ffebf696f"
  ],
  "author": {
    "name": "nussaibah shaikh",
    "email": "nussaibah@bugqore.com",
    "time": "Wed Oct 14 22:21:09 2026 +0530"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Oct 14 10:51:09 2026 -0600"
  },
  "message": "clamp variable advance before unsigned conversion (#6395)\n\nget_advance_with_var_unscaled adds the HVAR/VVAR advance delta to the\nbase advance and returns the sum as unsigned. The delta from\nItemVariationStore::get_delta is an unbounded float, so an HVAR whose\nitem-variation store uses long-word (int32) deltas across several\nregions that all peak at the axis extreme can make advance + roundf\n(delta) exceed the unsigned range; converting that float to unsigned is\nthen undefined behavior (UBSan float-cast-overflow), and hb_max (0.0f,\nNaN) would likewise pass NaN to the conversion. Reached from the public\nhb_font_get_glyph_h_advance / v_advance on a variable font.\n\nClamp the accumulated value into the unsigned range with hb_clamp_to\nbefore returning, matching the saturation already used for the\nvariation-derived glyph-extents arithmetic. Valid advances are\nunchanged. The template is shared by hmtx/HVAR and vmtx/VVAR, so all\nthree advance sites are covered.\n\nAdd a regression test under test/api driving a crafted long-word HVAR;\nit reports float-cast-overflow under the sanitizers job without the fix\nand passes with it. The full meson test suite passes.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6b83a34fb8ff5a156a292685a47310d3aa9a6f01",
      "old_mode": 33188,
      "old_path": "src/hb-ot-hmtx-table.hh",
      "new_id": "8d2ee89c11bfca461c70bac144f5922f30b36c0b",
      "new_mode": 33188,
      "new_path": "src/hb-ot-hmtx-table.hh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c9c224ed6fb8588a2753dcf274da413010fb641d",
      "new_mode": 33188,
      "new_path": "test/api/fonts/hvar-long-deltas.ttf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "952fd6d47acd41237bf84f8be2b3c8ea6a2d1456",
      "new_mode": 33188,
      "new_path": "test/api/generate-hvar-long-deltas-font.py"
    },
    {
      "type": "modify",
      "old_id": "cc0031470575bbc6a663daec6a0497c9641d39ee",
      "old_mode": 33188,
      "old_path": "test/api/test-ot-metrics-tt-var.c",
      "new_id": "7fd314dfbef57e7c2160be04fa1b839d153cc4f9",
      "new_mode": 33188,
      "new_path": "test/api/test-ot-metrics-tt-var.c"
    }
  ]
}
