String table overflow with Hafas binary trips

31 views
Skip to first unread message

Andreas Schildbach

unread,
May 25, 2015, 6:16:21 AM5/25/15
to public-transport...@googlegroups.com
I noticed a systematic problem with the Hafas binary format:

Nowadays the PT providers tend to include a lot of text with their query
responses, like disruptions, times of service, etc. This makes the
string table grow. If it grows larger than 65535 bytes, the various
string pointers overflow and point to random string fragments.

The issue can be reproduced by querying a trip with VbnProvider and
asking for more trips 4-5 times. As each query includes the results from
all previous queries, it can only lead to an overflow (presumably also
for the other providers). In my tests, the requestId (aka ident) was the
one that exhibited the problem first.

If someone would find a way to make Hafas *not* repeat all the previous
results, that would be much appreciated!
Reply all
Reply to author
Forward
0 new messages