[PATCH] fdo#42492: fixing Basic HEX command

János Uray uray.janos at gmail.com
Mon Jul 30 23:13:45 PDT 2012


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).

Regards,
Uray M. János
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120731/fa16ac4f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fdo-42492-fixing-Basic-HEX-command.patch
Type: text/x-patch
Size: 1384 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120731/fa16ac4f/attachment.bin>


More information about the LibreOffice mailing list