pdfalto icon indicating copy to clipboard operation
pdfalto copied to clipboard

tmp strings too small

Open mrihtar opened this issue 5 years ago • 2 comments

In XmlAltoOutputDev.cc a lot of small strings are allocated with the size of 10/20 or 50 characters. It seems that in some circumstances the buffer overflow occurs (typically when outputting the WIDTH attribute) and the strings then include some garbage. I suggest usage of snprintf or larger sizes or limiting the format %g/%d.

mrihtar avatar May 08 '19 15:05 mrihtar

Hello @mrihtar . I've been using snprintf for other double values, so I've made a change to generalise to all double values. For testing purposes, coud you share the document leading to such issue ?

Thanks

Aazhar avatar May 08 '19 16:05 Aazhar

Hello, Could you give updates about this issue ?

Aazhar avatar Jun 16 '19 11:06 Aazhar