Bug 147364 - CRASH calling a DLL function returning a string in LibreOffice x64 on Windows
Summary: CRASH calling a DLL function returning a string in LibreOffice x64 on Windows
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.4.0 target:7.3.2
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-11 07:15 UTC by Mike Kaganski
Modified: 2022-02-14 10:49 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-02-11 07:15:22 UTC
Running the following test function crashes LibreOffice x64 on Windows:

  Declare Function PathFindExtensionA Lib "Shlwapi" Alias "PathFindExtensionA" (ByVal pszPath As String) As String

  Sub test
    MsgBox PathFindExtensionA("filename.ext")
  End Sub
Comment 1 Mike Kaganski 2022-02-11 08:31:45 UTC
https://gerrit.libreoffice.org/c/core/+/129808
Comment 2 Commit Notification 2022-02-11 11:56:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5276177877cc53c53653a87f3038eb208a5580ab

tdf#147364: fix function signature to account to calling convention

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2022-02-14 10:49:19 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/596dc56ebf2b50911c525c3ae2282071964ea277

tdf#147364: fix function signature to account to calling convention

It will be available in 7.3.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.