[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Oct 27 07:53:52 PDT 2014


 sw/source/filter/basflt/iodetect.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2128f3c969ff6103511b7d485b9cbb2647427342
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Oct 27 15:40:13 2014 +0100

    SwIoSystem::GetFileFilter: prevent out of bounds string access
    
    Change-Id: I0f2ebc9cbad16534b50083cc6d13ee042c2ff869

diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 9fdfe13..64da606 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -171,7 +171,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName)
             {
                 while ( pFilter )
                 {
-                    if( 'C' == pFilter->GetUserData()[0] && IsValidStgFilter( xStor, *pFilter ) )
+                    if( !pFilter->GetUserData().isEmpty() && 'C' == pFilter->GetUserData()[0] && IsValidStgFilter( xStor, *pFilter ) )
                     {
                         if (pFilter->IsOwnTemplateFormat())
                         {


More information about the Libreoffice-commits mailing list