[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmlhelp/source
xmlhelp/source/cxxhelp/provider/databases.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 5c635c7773da618ad948c8b595deba53f8653cf9 Author: Caolán McNamara caol...@redhat.com Date: Thu Oct 24 16:18:41 2013 +0100 pEmpty is completely insane to use DbtToStringConverter protects against a NULL pointer, but not a pointer to the too short data that pEmpty provides Change-Id: I5d21e852ce0373eff7d3627e266b9cbc77f5dd09 (cherry picked from commit d94f3a68f77de906abd576c7e2f31e0a8586d154) Reviewed-on: https://gerrit.libreoffice.org/6421 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 447d1e0..331aa20 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -762,15 +762,13 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,helpdatafileproxy: listAnchor.realloc( id.size() ); listTitle.realloc( id.size() ); -const sal_Char* pData = NULL; -const sal_Char pEmpty[] = ; - for( sal_uInt32 i = 0; i id.size(); ++i ) { listId[i] = id[i]; listAnchor[i] = anchor[i]; -pData = pEmpty; +const sal_Char* pData = NULL; + if( pHdf ) { OString idi( id[i].getStr(),id[i].getLength(),RTL_TEXTENCODING_UTF8 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - xmlhelp/source
xmlhelp/source/cxxhelp/provider/databases.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 090d7f01fdbdb0abff52b86b5145216c6835acfc Author: Caolán McNamara caol...@redhat.com Date: Thu Oct 24 16:20:08 2013 +0100 valgrind: on success aHDFData is out of scope and pData points to data belonging to it (cherry picked from commit b7efab3a9841a9f01c5da07db870a22866b65b04) Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com Change-Id: I2a3c1f73e4cdcb07d21ef14cb410d351f39cdba8 diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 331aa20..0c4bdab 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -767,12 +767,12 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,helpdatafileproxy: listId[i] = id[i]; listAnchor[i] = anchor[i]; +helpdatafileproxy::HDFData aHDFData; const sal_Char* pData = NULL; if( pHdf ) { OString idi( id[i].getStr(),id[i].getLength(),RTL_TEXTENCODING_UTF8 ); -helpdatafileproxy::HDFData aHDFData; bool bSuccess = pHdf-getValueForKey( idi, aHDFData ); if( bSuccess ) pData = aHDFData.getData(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits