zint / zint-gpl-only

Zint Barcode Generator
https://zint.org.uk/
GNU General Public License v3.0
522 stars 137 forks source link

[Bug] maxicode copies to many chars #27

Closed chaosben closed 2 years ago

chaosben commented 11 years ago

The loop at line 414 in maxicode.c counts up to 9 and copies 10 chars into "substring" but there are only 9 chars to copy, because only 9 digits are to be compressed. So the loop should only count up to 8. That isn't a bug which causes an error, because "atoi" is tolerant with non-digit-chars after the number. But it is wrong and could cause problems in future.

gitlost commented 2 years ago

This issue no longer exists in the current version of Zint, thanks for the feedback, closing now.