Blob Blame History Raw
From 2580f10e8cec6fd9e3356a3a26a1cb6d8192e850 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Sun, 3 Aug 2014 22:47:27 +0200
Subject: [PATCH 077/137] avoid buffer overflow by using wrong buffer

Found by Asan.

(regression from CWS mba34issues01)

Change-Id: Ia7159c9bed9d7f823448acd02e18568a5f3f2093
Reviewed-on: https://gerrit.libreoffice.org/10717
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 955c5539a1ea5e971f111989d6c5bec11d936416)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
---
 sfx2/source/appl/appuno.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 50f8ee6..461d74c 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1021,7 +1021,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
         for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
         {
             // check every formal argument of the method
-            const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
+            const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg );
 
             sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
             if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //???
-- 
1.9.3