[Libreoffice] [PATCH] [REVIEW:3-5, 3-5-0] fdo#34432 ODBC crash on 64 bits

Lionel Elie Mamane lionel at mamane.lu
Sun Jan 29 12:36:27 PST 2012


Attached patch fixes fdo#34432, a crash with some ODBC drivers. The
bug report is about Firebird SQL.

The problem is that SQLGetStmtAttr is passed a pointer to a memory
area to write to. In several places, we give it a pointer to a
stack-allocated sal_(u)Int32, but it expects a pointer to a
SQLULEN. On 32 bits, no problem since SQLULEN==sal_uInt32. On a 64
bits machine, SQLULEN is 64 bits, so the driver writes beyond the area
we expect it to, and smashes our stack -> crash.

Please apply to libreoffice-3-5 and libreoffice-3-5-0 (crossing my
fingers on "before rc3 tag").

Thanks!

-- 
Lionel


More information about the LibreOffice mailing list