pptx: classic chart readPoints must cap hostile ptCount/sparse idx
Author: aniruddhaadak80Created Sep 21, 2026Updated Sep 22, 2026
Problem
readPoints allocates new Array(max(n, pts.length)) from an uncapped ptCount integer and writes out[idx] with unbounded idx, so one hostile chart hangs or OOMs file open via a 1e9 sparse array.
Evidence
- packages/pptx-engine/src/chart.ts:961-966
Suggested fix
Cap n (e.g. <=10000) and ignore idx < 0 or >= n.
Acceptance
- ptCount 1000000000 + idx 999999999 parse to a capped array fast.
Source: genspark-ai/genoffice