Ok, pushed now and also with a further tweak to avoid sprintf and the hardcoded buffersize ( 'cause 17 is too big anyway ) http://cgit.freedesktop.org/libreoffice/core/commit/?id=02a7dfb729799f9e1437a718951566640d0fde02

On 31/07/12 12:55, János Uray wrote:
Yes, that is what I was trying to say: length 15 and length 16 were both wrong. There were two mistakes: the buffer overflow, and the non-compatible types and printf-strings. Fixing the latter one (which resulted in 16 characters on 64-bit platforms, where C++ "long" is 64-bit) makes the former one (the 15 characters) irrelevant. The patch prints at most 4 (integer) or 8 (long) characters. The integer and long in LibreOffice Basic are described here: http://help.libreoffice.org/Basic/Using_Variables#Integer_Variables Microsoft Visual Basic uses double sizes (4 and 8 bytes): http://msdn.microsoft.com/en-US/library/47zceaw7%28v=vs.110%29
be careful with the documentation, there is a trap, VBA ( Visual Basic for Applications ) can be different from VB ( Visual Basic ), in this case http://msdn.microsoft.com/en-us/library/office/aa164754%28v=office.10%29 you can see the definitions of Long and Integer types are the same as Libreoffice basic.

Noel
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to