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


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

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.