[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at suse.cz
Thu Aug 22 02:15:39 PDT 2013
sw/source/filter/ascii/wrtasc.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8a569f1c4decc7440e9dae1af35d7fa59c3b0121
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Aug 22 11:04:15 2013 +0200
SwASCWriter: out of bounds substring access
Regression from 6e0d836ff120ba292ba52f3623a3dd9be04aefc2, when simply
copy-pasting some string to a terminal window, rFltNm is empty.
Change-Id: I874e262ef1a3ebb38d90d9ef4f1b8d3457c5daff
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 87d1002..a7ee4f1 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -74,7 +74,7 @@ SwASCWriter::SwASCWriter( const OUString& rFltNm )
break;
default:
- if( rFltNm.copy( 4 )=="_DLG" )
+ if( rFltNm.getLength() >= 4 && rFltNm.copy( 4 )=="_DLG" )
{
// use the options
aNewOpts = GetAsciiOptions();
More information about the Libreoffice-commits
mailing list