Re: [mkgmap-dev] [mkgmap-svn] Commit r4848: catch some special cases which caused infinite loop in mkgmap or wrong data in MDR16 if there is not much data

Hi Gerd Did the '5' nibble in byte 2 indicate the size of lookup table? if so, could reduce the table size so it overflows. I assume that setting byte 3 to <= table size didn't work Ticker On Thu, 2022-01-06 at 09:25 +0000, svn commit wrote:
Version mkgmap-r4848 was committed by gerd on Thu, 06 Jan 2022 BRANCH: mdr2 catch some special cases which caused infinite loop in mkgmap or wrong data in MDR16 if there is not much data in the index - I don't know yet what Garmin expects when there are very few characters in the Huffman tree so that all fit into the lookup table. Maybe this is what the unknown flag in the initial bits field is about - don't try to encode with invalid data in mdr16
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4848 _______________________________________________ mkgmap-svn mailing list To unsubscribe send an mail to mkgmap-svn-leave@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-svn

Hi Ticker, I looked again at the code in GPXSee and that seems to indicate that Garmin may drop the lookup table for small trees. In that case 0 is written instead of 5 or 6. I already tried values like 4 and that always caused crashes. Working on this .. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 6. Januar 2022 10:34 An: mkgmap-dev@lists.mkgmap.org.uk; mkgmap-svn@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4848: catch some special cases which caused infinite loop in mkgmap or wrong data in MDR16 if there is not much data Hi Gerd Did the '5' nibble in byte 2 indicate the size of lookup table? if so, could reduce the table size so it overflows. I assume that setting byte 3 to <= table size didn't work Ticker On Thu, 2022-01-06 at 09:25 +0000, svn commit wrote:
Version mkgmap-r4848 was committed by gerd on Thu, 06 Jan 2022 BRANCH: mdr2 catch some special cases which caused infinite loop in mkgmap or wrong data in MDR16 if there is not much data in the index - I don't know yet what Garmin expects when there are very few characters in the Huffman tree so that all fit into the lookup table. Maybe this is what the unknown flag in the initial bits field is about - don't try to encode with invalid data in mdr16
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4848 _______________________________________________ mkgmap-svn mailing list To unsubscribe send an mail to mkgmap-svn-leave@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-svn
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Gerd Petermann
-
Ticker Berkin