Arawoof06 opened a new pull request, #1364: URL: https://github.com/apache/arrow-java/pull/1364
## What's Changed `VectorAppender.visit(BaseVariableWidthVector)` and `visit(BaseLargeVariableWidthVector)` copy the delta's value bytes with `MemoryUtil.copyMemory`, starting at the delta's first offset for `lastOffset - firstOffset` bytes, and nothing checks that range against the delta data buffer. `ArrowReader.loadDictionary` passes IPC delta dictionary batches straight to `VectorBatchAppender.batchAppend`, so a stream whose VarChar delta dictionary has offsets `[0, 4, 4096]` over an 8-byte data buffer appends a 4092-byte dictionary value filled with adjacent native memory, with bounds checking enabled. The fix uses `ArrowBuf.setBytes(index, src, srcIndex, length)`, which always validates the source range, and the new test in `TestArrowReaderWriter` builds that stream and expects `IndexOutOfBoundsException`. The other copies in `VectorAppender` are already covered, because `VectorLoader` resizes the delta's validity, offset and view buffers to the row count and the end-offset read is bounds checked. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
