)]}'
{
  "commit": "22f9750bf0de0e42bd8550fb5f01bc6ab422d350",
  "tree": "e916204531a25c8bb1db2cb6a4532eac591dda56",
  "parents": [
    "de73e14f4ac827da99f13f7a96cc65b57bd6077b"
  ],
  "author": {
    "name": "Abdul Rawoof Khan",
    "email": "abdulr@bugqore.com",
    "time": "Fri Nov 06 09:43:32 2026 +0530"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Nov 06 05:13:32 2026 +0100"
  },
  "message": "MINOR: Check source range in ArrowBuf.setBytes for direct ByteBuffers (#1380)\n\n## What\u0027s Changed\n\n`ArrowBuf.setBytes(long index, ByteBuffer src, int srcIndex, int\nlength)` bounds-checks only the destination. When `src` is a direct\nbuffer it copies `length` bytes from `getByteBufferAddress(src) +\nsrcIndex` with `MemoryUtil.copyMemory`, so a source range past\n`src.capacity()` (or a negative `srcIndex`) silently copies adjacent\nnative memory into the ArrowBuf, even with bounds checking enabled. For\nexample, `buf.setBytes(0, ByteBuffer.allocateDirect(8), 0, 64)`\nsucceeds. The heap path already rejects this through\n`ByteBuffer.position/limit`, and the `byte[]` and `ArrowBuf` overloads\n(and `NettyArrowBuf.setBytes(ByteBuf)`) check the source with\n`isOutOfBounds`. This adds the same source check before either path, so\nthe `set/setSafe(int, ByteBuffer, int, int)` methods on the\nvariable-width vectors fail with `IndexOutOfBoundsException` instead of\nreading out of bounds. Valid ranges behave as before. Added a regression\ntest to `TestArrowBuf`.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c3eafaacf37a18df81b132424bdb2a8c9e45f187",
      "old_mode": 33188,
      "old_path": "memory/memory-core/src/main/java/org/apache/arrow/memory/ArrowBuf.java",
      "new_id": "6bc113e4aeabfac27543dbe44b6dc672cc623a14",
      "new_mode": 33188,
      "new_path": "memory/memory-core/src/main/java/org/apache/arrow/memory/ArrowBuf.java"
    },
    {
      "type": "modify",
      "old_id": "60e118d557cf6cb4db4086c6994e3188e121a571",
      "old_mode": 33188,
      "old_path": "memory/memory-core/src/test/java/org/apache/arrow/memory/TestArrowBuf.java",
      "new_id": "fdb77882f919f66368b8aea65a2f7ad118f09942",
      "new_mode": 33188,
      "new_path": "memory/memory-core/src/test/java/org/apache/arrow/memory/TestArrowBuf.java"
    }
  ]
}
