)]}'
{
  "commit": "7fff3380e3a81fa810bba1214855cf58441fb58e",
  "tree": "eb7c54d815deef48ba99c6ecbb3e45bd2782b641",
  "parents": [
    "33435692ef0d17b4315c7185223d133cab70cf41"
  ],
  "author": {
    "name": "Christofer Dutz",
    "email": "christofer.dutz@c-ware.de",
    "time": "Thu Aug 20 11:40:31 2026 +0200"
  },
  "committer": {
    "name": "Christofer Dutz",
    "email": "christofer.dutz@c-ware.de",
    "time": "Thu Aug 20 11:40:31 2026 +0200"
  },
  "message": "fix(spi): compare bit counts against remaining capacity in ensureAvailable\n\nThe check was written as (positionInBits + bitsNeeded \u003e sizeInBits), which\nloses its meaning for bit counts approaching Integer.MAX_VALUE: the sum wraps\nnegative and the comparison passes for a request the buffer cannot satisfy.\nCallers size allocations from that width, so readBits then failed with a\nNegativeArraySizeException from its own (numBits + 7) / 8 overflow rather than\na BufferException.\n\nCompares against the remaining bits instead. Both operands are non-negative,\nso the subtraction cannot overflow for any input, and negative widths are\nrejected explicitly.\n\nAdds EnsureAvailableOverflowTest covering the whole wrapping window and\nasserting that reads up to exactly the remaining bits still succeed.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9017ec0c3feac15fd120b8a46e1f245b4562cd4c",
      "old_mode": 33188,
      "old_path": "plc4j/spi/buffers/byte/src/main/java/org/apache/plc4x/java/spi/buffers/bytebased/AbstractBufferByteBased.java",
      "new_id": "b58070c1253bacb4751388ba7104b538c132e7d9",
      "new_mode": 33188,
      "new_path": "plc4j/spi/buffers/byte/src/main/java/org/apache/plc4x/java/spi/buffers/bytebased/AbstractBufferByteBased.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b569528bcae312c57f173edb435a78e822d88957",
      "new_mode": 33188,
      "new_path": "plc4j/spi/buffers/byte/src/test/java/org/apache/plc4x/java/spi/buffers/bytebased/EnsureAvailableOverflowTest.java"
    }
  ]
}
