summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-16 20:27:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-17 12:18:29 +0100
commit93f7966140d71ac8a2489fa4cd5d88ba4d54620d (patch)
treec0003ae916099e4cf169f8a40dc9730c614063be /vcl/source
parent185ed8d270da6d41b1860b7afd74351098da14a0 (diff)
ofz#31021 Stack-buffer-overflow
Conditional jump or move depends on uninitialised value(s) at 0x483CB98: strlen (vg_replace_strmem.c:459) by 0x49B4CA3: int rtl::str::getLength<char>(char const*) (strtmpl.hxx:65) by 0x49B7232: void rtl::str::newFromStr<_rtl_String>(_rtl_String**, rtl::str::STRCODE_DATA<_rtl_String>::type const*) (strtmpl.hxx:1344) by 0x49B470C: rtl_string_newFromStr (string.cxx:611) by 0x6059266: rtl::OString::OString<char [18]>(char (&) [18], rtl::libreoffice_internal::NonConstCharArrayDetector<char [18], rtl::libreoffice_internal::Dummy>::Type) (string.hxx:275) by 0x6058B5E: vcl::GraphicFormatDetector::checkTGA() (GraphicFormatDetector.cxx:525) since... commit 48d655fe12bc2c4c42d6c88b8a43fade1614ee2a Date: Mon Feb 15 16:25:56 2021 +0900 vcl: Detect TGA graphic by inspecting the file footer Change-Id: I52641ac541d5631e16fc271c35d6a671acb75c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/GraphicFormatDetector.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx
index e5a1eb5f9a79..4a2117b6f5b9 100644
--- a/vcl/source/filter/GraphicFormatDetector.cxx
+++ b/vcl/source/filter/GraphicFormatDetector.cxx
@@ -522,8 +522,7 @@ bool GraphicFormatDetector::checkTGA()
mrStream.SeekRel(-18);
mrStream.ReadBytes(sFooterBytes, 18);
- OString aFooterString(sFooterBytes);
- if (aFooterString == "TRUEVISION-XFILE.")
+ if (memcmp(sFooterBytes, "TRUEVISION-XFILE.", SAL_N_ELEMENTS(sFooterBytes)) == 0)
{
msDetectedFormat = "TGA";
return true;
verywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988 2017-04-27Translate German comments (rest of svx/ except svx/source/form/)Johnny_M Change-Id: Ib0fccc41c71902861f450c6184f57be2c5da0811 Reviewed-on: https://gerrit.libreoffice.org/36804 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> 2017-04-04coverity#1403732 Mixing enum typesCaolán McNamara and coverity#1403735 Mixing enum types coverity#1403737 Mixing enum types Change-Id: I278b7d5116d4157e6aa4483d8eef42325e4bc03b 2017-03-31use actual UNO enums in svxNoel Grandin Change-Id: I00f53260667861ca2595892b5605479da3401adb Reviewed-on: https://gerrit.libreoffice.org/35913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> 2016-10-05convert MapUnit to scoped enumNoel Grandin I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-07-26tdf#75280 Cleaning up of sal_uIntPtr usage #4atymyjan Change-Id: I488baed0ffc3fea9c42bad1647a034cd5e9b28bb Reviewed-on: https://gerrit.libreoffice.org/27325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> 2016-02-04vcl: take into account the font width is the average font widthChris Sherlock I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> 2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann Change-Id: I72d11153ffccc51633aec78c802822173dd7f5ed 2015-06-23rendercontext: Mass fix of using the wrong size.Jan Holesovsky In the paints, we must use the size of the Window for the computations, not of the RenderContext - the RenderContext can be much bigger than the Window in the double-buffering case. Fixes for example the list boxes, and many others. Change-Id: I4c7607569f88b2d097587140858d0862e54b5ea6 2015-05-20convert DEFAULTCONSTANT constant to scoped enumNoel Grandin Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3 2015-05-13loplugin:staticmethodsStephan Bergmann Change-Id: Ia16605c8227573948e2ac750414e9dff3efc2f81 2015-05-13refactor SvxSwFrameExample to use RenderContextTomaž Vajngerl Change-Id: Ice4ffab3bc98b76b7ee90aa4570b2858b01bf906 2015-05-11tdf#91052 - more macros for 'make' constructors.Michael Meeks Change-Id: Iece86485c52041b66cde91d7fbc772db16d90a93 2015-05-06convert DEFAULTFONT_ constants to scoped enumNoel Grandin Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46 2015-04-29mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)Tomaž Vajngerl Change-Id: Ia1667246064d11827dbd149def15e5bf08b119b8 2015-04-28Merge remote-tracking branch 'origin/feature/vclptr'Michael Meeks Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95 2015-04-24loplugin:simplifyboolStephan Bergmann Change-Id: I02bc964fd2b240fb5238e3de72239d410587ae5c 2015-04-23Improved loplugin:literaltoboolconversion looking into cond. exprs.Stephan Bergmann ...automatic rewriter fixes Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee 2015-04-15remove unnecessary use of void in function declarationsNoel Grandin ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd 2015-04-09vcl: VclPtr conversion in svx.Noel Grandin Change-Id: I3a1000baa049b11728c46efbc2f0af0d8f34cf2b Conflicts: include/svx/charmap.hxx include/svx/float3d.hxx include/svx/fontwork.hxx include/svx/galctrl.hxx svx/inc/svdibrow.hxx svx/source/dialog/dlgctl3d.cxx svx/source/dialog/fontwork.cxx svx/source/engine3d/float3d.cxx svx/source/fmcomp/gridctrl.cxx svx/source/gallery2/galbrws1.cxx svx/source/inc/docrecovery.hxx 2015-01-12convert SETTINGS_ #defines to 'enum class'Noel Grandin and dump the ones that nothing is listening to Change-Id: I253ef284df785812a439dd160edba1b07fdbaac4 2015-01-12fdo#84938: replace DATACHANGED_ constants with 'enum class'Noel Grandin and drop DATACHANGED_DATETIME because no-one is using it Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff 2014-09-23fdo#82577: Handle WindowNoel Grandin Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a 2014-09-18fdo#82577: Handle FontNoel Grandin Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537 2014-04-15svx: sal_Bool->boolNoel Grandin Change-Id: I464eba5fd5521c31868c6fc8a2137f17428d421e 2014-03-11svx: sal_Bool->boolNoel Grandin Change-Id: I1b692a9ca5f2580b0815b881a33f3eded7267ac1 2014-02-20Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxxTobias Lippert Added vcl/settings.hxx to all cxx files which require it. This helps to speed up compilation after changes to the settings. Conflicts: sc/source/ui/dbgui/pvlaydlg.cxx Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4 Reviewed-on: https://gerrit.libreoffice.org/7933 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2013-08-18callcatcher: update unused codeCaolán McNamara One of the SfxTabDialog ResID ctors is now gone, progress. Equally pleasing is that the last use of the old PercentField is gone now as well, so that can be removed and the new PercentFieldWrap can be renamed as PercentField to take its place Change-Id: I7a706e98d4dfdc3541da73c3375ee067a799b4bd 2013-08-16convert frame type page to .uiCaolán McNamara Change-Id: Id2be1940652e0d26efe4fdb92b750039744632de 2013-04-20fdo#63154: Change Min/Max/Abs for std::min/max/absMarcos Paulo de Souza Now all these usages were removed from LO. Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6 Reviewed-on: https://gerrit.libreoffice.org/3326 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> 2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09 2012-11-27re-base on ALv2 code. Includes:Michael Meeks Patch contributed by Christian Lippka impress212: #i113063# patch: dubios self assign in svx/source/dialog/framelink.cxx http://svn.apache.org/viewvc?view=revision&revision=1167619 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation http://svn.apache.org/viewvc?view=revision&revision=1172343 cws mba34issues01: #i117719#: use correct resource ID http://svn.apache.org/viewvc?view=revision&revision=1172351 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 Patches contributed by Armin Le-Grand #118804# corrected GraphicExporter behaviour on shortcut when pixel graphic is requested http://svn.apache.org/viewvc?view=revision&revision=1240195 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 13f79535-47bb-0310-9956-ffa450edef68 Patch contributed by Regina Henschel linecap: Reintegrating finished LineCap feature http://svn.apache.org/viewvc?view=revision&revision=1232507 Patch contributed by Wang Lei (leiw) #i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash http://svn.apache.org/viewvc?view=revision&revision=1301361 cleanup globlmn hacks, undo dependent fixmes. 2012-11-22AllSettings with LanguageTagEike Rathke Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d 2012-07-09some UniString->rtl::OUStringCaolán McNamara Change-Id: Ie69b30094da25df23a36baca2c7723d6a41f48c3 2012-07-03ditch String::CreateFromAsciiCaolán McNamara Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691 2012-06-09Remove superfluous empty lines on topThomas Arnhold More than two lines are removed for readability. Change-Id: Ibff6cf68d7c512e240a54065b54a225bb23a782b