• Mike Kaganski's avatar
    Make Windows error reporting more robust · e3530d2c
    Mike Kaganski yazdı
    https://msdn.microsoft.com/en-us/library/ms679351 describes that
    "it is unsafe to take an arbitrary system error code returned from an API
    and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS"
    Previously in case when an error string would contain inserts, function
    returned error, so the error message wasn't shown (at least it didn't
    crash, thanks to nullptr as the function's last argument).
    
    As the function may fail, we now pre-nullify the buffer pointer to avoid
    dereferencing uninitialized pointer later (though at least for some
    Windows versions, the function nullifies the pointer in case of
    FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this).
    
    Also release of allocated buffer is changed to recommended use of
    HeapFree.
    
    The code that doesn't make use of OUString is left directly calling
    FormatMessage, to avoid introducing new dependencies. Where it makes
    sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx>
    
    Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848
    Reviewed-on: https://gerrit.libreoffice.org/44206Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
    Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    e3530d2c
Adı
Son kayıt (commit)
Son güncelleme
..
LibreOfficeKit Loading commit data...
android Loading commit data...
animations Loading commit data...
apple_remote Loading commit data...
avmedia Loading commit data...
basegfx Loading commit data...
basic Loading commit data...
canvas Loading commit data...
codemaker Loading commit data...
com/sun/star/uno Loading commit data...
comphelper Loading commit data...
connectivity Loading commit data...
cppcanvas Loading commit data...
cppu Loading commit data...
cppuhelper Loading commit data...
cppunittester Loading commit data...
dbaccess Loading commit data...
desktop Loading commit data...
drawinglayer Loading commit data...
editeng Loading commit data...
filter Loading commit data...
formula Loading commit data...
fpicker Loading commit data...
framework Loading commit data...
helpcompiler Loading commit data...
i18nlangtag Loading commit data...
i18nutil Loading commit data...
jvmaccess Loading commit data...
jvmfwk Loading commit data...
linguistic Loading commit data...
o3tl Loading commit data...
onlineupdate Loading commit data...
oox Loading commit data...
opencl Loading commit data...
osl Loading commit data...
package Loading commit data...
registry Loading commit data...
rtl Loading commit data...
sal Loading commit data...
salhelper Loading commit data...
sax Loading commit data...
sfx2 Loading commit data...
sot Loading commit data...
store Loading commit data...
svl Loading commit data...
svtools Loading commit data...
svx Loading commit data...
systools/win32 Loading commit data...
test Loading commit data...
toolkit Loading commit data...
tools Loading commit data...
typelib Loading commit data...
ucbhelper Loading commit data...
uno Loading commit data...
unoidl Loading commit data...
unotest Loading commit data...
unotools Loading commit data...
vbahelper Loading commit data...
vcl Loading commit data...
xmloff Loading commit data...
xmlreader Loading commit data...
xmlscript Loading commit data...
default.rc Loading commit data...
postmac.h Loading commit data...
postwin.h Loading commit data...
premac.h Loading commit data...
prewin.h Loading commit data...
version.hrc Loading commit data...