odk/source/com/sun/star/lib/loader/Loader.java | 19 ++++++++++++++++--- starmath/source/view.cxx | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-)
New commits: commit 0d8813dc5c56de0df31a55fb8452668ec3980891 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Sep 15 11:25:28 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Sep 15 15:30:50 2022 +0200 Conditional jump or move depends on uninitialised value ==1533286== Conditional jump or move depends on uninitialised value(s) ==1533286== at 0x12DEC3C9: param_double_validate (gparamspecs.c:592) ==1533286== by 0x12DEF924: g_param_value_validate (gparam.c:700) ==1533286== by 0x12DEFA9A: object_set_property (gobject.c:1594) ==1533286== by 0x12DF1F96: g_object_set_valist (gobject.c:2538) ==1533286== by 0x12DF2253: g_object_set (gobject.c:2705) ==1533286== by 0x241E8C44: gtk_adjustment_configure (gtkadjustment.c:833) ==1533286== by 0x23B6310A: (anonymous namespace)::GtkInstanceScrolledWindow::vadjustment_configure(int, int, int, int, int, int) (gtkinst.cxx:8207) ==1533286== by 0x23B63D3D: virtual thunk to (anonymous namespace)::GtkInstanceScrolledWindow::vadjustment_configure(int, int, int, int, int, int) (gtkinst.cxx:0) ==1533286== by 0x36424112: SmGraphicWindow::Resize() (view.cxx:227) Change-Id: Ib81e26b1042e7a5eebd0a2b561f57f7b4eb25dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140002 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index b9b552bd9678..21ff5afce349 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -105,6 +105,8 @@ using namespace css::uno; SmGraphicWindow::SmGraphicWindow(SmViewShell& rShell) : InterimItemWindow(&rShell.GetViewFrame()->GetWindow(), "modules/smath/ui/mathwindow.ui", "MathWindow") + , nLinePixH(GetSettings().GetStyleSettings().GetScrollBarSize()) + , nColumnPixW(nLinePixH) , nZoom(100) // continue to use user-scrolling to make this work equivalent to how it 'always' worked , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow", true)) @@ -113,8 +115,6 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell& rShell) { InitControlBase(mxGraphic->GetDrawingArea()); - nColumnPixW = nLinePixH = GetSettings().GetStyleSettings().GetScrollBarSize(); - mxScrolledWindow->connect_hadjustment_changed(LINK(this, SmGraphicWindow, ScrollHdl)); mxScrolledWindow->connect_vadjustment_changed(LINK(this, SmGraphicWindow, ScrollHdl)); commit b370b510af613303e4856ab8de7b394dc4cd3bef Author: Caolán McNamara <[email protected]> AuthorDate: Wed Sep 7 16:55:41 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Sep 15 15:30:35 2022 +0200 cid#1500416 Resource leak Change-Id: I090e10604562665cf22aa98758e81dd398f4f9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139997 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/odk/source/com/sun/star/lib/loader/Loader.java b/odk/source/com/sun/star/lib/loader/Loader.java index bc1a3c3e7bb0..5aae9848d775 100644 --- a/odk/source/com/sun/star/lib/loader/Loader.java +++ b/odk/source/com/sun/star/lib/loader/Loader.java @@ -199,6 +199,15 @@ public final class Loader { } } + private static void close(InputStream c) { + if (c == null) return; + try { + c.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + private static void callUnoinfo(String path, ArrayList<URL> urls) { Process p; try { @@ -214,9 +223,10 @@ public final class Loader { int code; byte[] buf = new byte[1000]; int n = 0; + InputStream is = null; try { - InputStream s = p.getInputStream(); - code = s.read(); + is = p.getInputStream(); + code = is.read(); for (;;) { if (n == buf.length) { if (n > Integer.MAX_VALUE / 2) { @@ -229,7 +239,7 @@ public final class Loader { System.arraycopy(buf, 0, buf2, 0, n); buf = buf2; } - int k = s.read(buf, n, buf.length - n); + int k = is.read(buf, n, buf.length - n); if (k == -1) { break; } @@ -240,7 +250,10 @@ public final class Loader { "com.sun.star.lib.loader.Loader::getCustomLoader: reading" + " unoinfo output: " + e); return; + } finally { + close(is); } + int ev; try { ev = p.waitFor();
