#29672·protobuf

Python upb: 在 del repeated_field[start:stop:step] 中的空扩展切片执行了越界 memmove 操作

作者: Asmatan创建于 2026年9月9日更新于 2026年9月9日

static int PyUpb_RepeatedContainer_DeleteSubscript(upb_Array* arr, Py_ssize_t idx, Py_ssize_t count, Py_ssize_t step) {

  • // An empty slice deletes nothing. Without this, the step>1 branch below
  • // sets src = start + 1, which can exceed the array size and make
  • // tail = SIZE_MAX. …

内容来源: protocolbuffers/protobuf