To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=115716


User sb changed the following:

                What    |Old value                 |New value
================================================================================
          Ever confirmed|                          |1
--------------------------------------------------------------------------------
                  Status|UNCONFIRMED               |STARTED
--------------------------------------------------------------------------------
        Target milestone|---                       |OOo 3.4
--------------------------------------------------------------------------------




------- Additional comments from s...@openoffice.org Fri Nov 26 10:33:46 +0000 
2010 -------
Hamburg-internal issue #162141# "Runtime does not handle strings in the right
way" changed the marshaling of Basic data used in "external DLL" calls (changes
to basic/source/runtime/dllmgr.cxx, lumped together with many other things in
<http://hg.services.openoffice.org/OOO330/rev/bd4551ecc553>).  The corresponding
tests unfortunately only checked that strings passed back from such an
"external" call were correct (the string used in GetLogicalDriveStrings from
kernel32.dll to return a list of null-separated drive strings).

What apparently broke, however, is (1) to pass strings into such "external"
calls ("Software\OOo_TEST_KEY" in lpSubKey of RegCreateKeyA, "OOo_TEST_DATA"
lpValueName of RegSetValueExA), and (2) to pass strings into such "external"
calls via "Any" ("THIS IS A TEST" in lpData of RegSetValueExA).

For (1), the problem is that the terminating null byte is missing from the
marshaled string data.  The following patch would fix that:

---8<---
--- a/basic/source/runtime/dllmgr.cxx   Tue Nov 23 16:56:16 2010 +0100
+++ b/basic/source/runtime/dllmgr.cxx   Fri Nov 26 11:30:51 2010 +0100
@@ -207,6 +207,7 @@
     }
     std::vector< char > * blob = data.newBlob();
     blob->insert(blob->begin(), str.getStr(), str.getStr() + str.getLength());
+    blob->push_back(0);
     *buffer = address(*blob);
     data.unmarshalStrings.push_back(StringData(variable, *buffer, special));
     return ERRCODE_NONE;
---8<---

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@framework.openoffice.org
For additional commands, e-mail: issues-h...@framework.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to