Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 31/07/12 07:13, János Uray wrote:
The patch solves this bug: https://bugs.freedesktop.org/show_bug.cgi?id=42492 There was a buffer overflow: char aBuffer[16] had no room for the terminating null character. But the hex command was still wrong, because the printf used "%X" and "%lX", which are very platform-dependent. Actually the "integer" is only 16-bit, and "long" is only 32-bit. I've corrected this by using "%"SAL_PRIXUINT32 as described in http://wiki.documentfoundation.org/Development/Sal_Types (and there is no SAL_PRIXUINT16, so both were converted to sal_uInt32).
hmm, not looking at the patch in detail yet I am not sure if a length of 16 is sensible, if the size of the type for the hex output is 2 (integer) or 4 bytes (long) I would expect the max display from HEX to be FFFF or FFFFFFFF respectively :/ I'd like to see what MS vba does here, we should try to remain compatible if possible.

Noel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.