Jens Geyer created THRIFT-6358:
----------------------------------

             Summary: OCaml skip reads one element too many for maps, sets and 
lists
                 Key: THRIFT-6358
                 URL: https://issues.apache.org/jira/browse/THRIFT-6358
             Project: Thrift
          Issue Type: Bug
          Components: OCaml - Library
            Reporter: Jens Geyer


The map, set and list cases of {{skip}} in {{Thrift.ml}} looped over {{0..s}}, 
which is one iteration more than the declared count {{s}}, so skipping a 
container read one element past its end.

Fixed on master by 
[1519d955a|https://github.com/apache/thrift/commit/1519d955a6623ba78ff0a043b1a60444a3644e06]:
 the loops skip exactly the declared number of elements.

Reported by Sylwester Lachiewicz.

_Drafted with AI assistance (Claude Opus 5); reviewed and posted by Jens Geyer._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to