Hello community,

here is the log from the commit of package libproxy.14534 for 
openSUSE:Leap:15.2:Update checked in at 2020-10-17 06:22:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:Update/libproxy.14534 (Old)
 and      /work/SRC/openSUSE:Leap:15.2:Update/.libproxy.14534.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libproxy.14534"

Sat Oct 17 06:22:40 2020 rev:1 rq:841643 version:0.4.15

Changes:
--------
New Changes file:

--- /dev/null   2020-10-12 00:46:48.009358834 +0200
+++ 
/work/SRC/openSUSE:Leap:15.2:Update/.libproxy.14534.new.3486/libproxy-plugins.changes
       2020-10-17 06:22:41.381688504 +0200
@@ -0,0 +1,738 @@
+-------------------------------------------------------------------
+Wed Sep 30 18:50:44 UTC 2020 - Michael Gorse <mgo...@suse.com>
+
+- Add libproxy-CVE-2020-25219.patch: Rewrite url::recvline to be
+  nonrecursive (boo#1176410 CVE-2020-25219).
+- Add libproxy-fix-pac-buffer-overflow.patch: fix buffer overflow
+  when PAC is enabled (boo#1177143 CVE-2020-26154).
+
+-------------------------------------------------------------------
+Thu Feb 22 15:13:54 UTC 2018 - fv...@suse.com
+
+- Use %license (boo#1082318)
+
+-------------------------------------------------------------------
+Thu Sep  7 19:29:58 UTC 2017 - jeng...@inai.de
+
+- Update descriptions and RPM categories.
+
+-------------------------------------------------------------------
+Thu May 11 09:36:16 UTC 2017 - dims...@opensuse.org
+
+- Update to version 0.4.15:
+  + Port to, and require, SpiderMonkey 38.
+  + Fix "NetworkManager plugin not being built"
+    (gh#libproxy/libproxy#53).
+  + Fix "networkmanager plugin not working
+    (gh#libproxy/libproxy#58).
+  + Fix "Invalid read after free" (gh#libproxy/libproxy#59).
+  + Fix intermittent unit test failures.
+- Replace pkgconfig(mozjs185) buildRequires with
+  pkgconfig(mozjs-38), following upstream.
+
+-------------------------------------------------------------------
+Mon Feb  6 12:30:17 UTC 2017 - dims...@opensuse.org
+
+- Have libproxy1-config-kde require libqt5-qtpaths instead of
+  libqt5-qttools on openSUSE > 13.2 / openSUSE > Leap 42.x
+  (boo#988808).
+
+-------------------------------------------------------------------
+Mon Jan  9 14:33:04 UTC 2017 - dims...@opensuse.org
+
+- Update to version 0.4.14:
+  + Parallel build support for python2 and python3.
+    -DWITH_PYTHON has been replaced with -DWITH_PYTHON2 and
+    -DWITH_PYTHON3 to have full control over this. Default is
+    ON for both (gh#libproxy/libproxy#22).
+  + Minor fixes to the PAC retriever code
+    (gh#libproxy/libproxy#40).
+  + Fallback to mcs instead of gmcs for the mono bindings
+    (gh#libproxy/libproxy#37).
+  + Fix build using cmake 3.7.
+  + Fix deprecation warnings of pxgsettings with glib 2.46.
+  + Improve the get-pac test suite (gh#libproxy/libproxy#47).
+- Drop update-from-svn.sh: The script has not been usable for
+  years, since libproxy is no longer hosted in this svn repo.
+- Drop upstream merged patches:
+  + libproxy-cmake-3.7.patch
+  + libproxy-FindMono-4.6.patch
+  + libproxy-gnome-waitpid.patch
+  + libproxy-python3-support.patch
+- Re-enable the test suite: with the upstream changes this should
+  now be more reliable.
+
+-------------------------------------------------------------------
+Tue Nov 22 08:18:37 UTC 2016 - dims...@opensuse.org
+
+- Add libproxy-cmake-3.7.patch: Fix build with cmake 3.7.
+
+-------------------------------------------------------------------
+Thu Sep 29 09:48:02 UTC 2016 - dims...@opensuse.org
+
+- Add libproxy-FindMono-4.6.patch: Fall back to mcs if gmcs cannot
+  be found. Fixes issues with mono 4.6, which no longer ships the
+  wrapper by default.
+
+-------------------------------------------------------------------
+Mon Aug  8 13:16:48 UTC 2016 - dims...@opensuse.org
+
+- Add libproxy-python3-support.patch: Allow to build PYTHON2 and
+  PYTHON3 bindings during the same build phase.
+- Create new subpackage python3-libproxy.
+- Add python3-devel BuildRequires when not building core.
+
+-------------------------------------------------------------------
+Fri Jul 22 12:36:59 UTC 2016 - dims...@opensuse.org
+
+- Add libproxy-gnome-waitpid.patch: GNOME3: Wait for pxgsettings to
+  vanish while destroying the plugin (boo#967601).
+
+-------------------------------------------------------------------
+Fri May 20 07:34:21 UTC 2016 - alarr...@suse.com
+
+- Update to GNOME 3.20.2 (Fate#318572, bnc#980527)
+
+-------------------------------------------------------------------
+Tue May 10 17:20:55 UTC 2016 - dims...@opensuse.org
+
+- Require libqt5-qttools by libproxy1-config-kde: the plugin spawns
+  qtpaths to find the right config files (boo#979232).
+- Trigger libproxy1-config-kde for installation when
+  plasma5-session and libproxy1 are installed.
+
+-------------------------------------------------------------------
+Mon May  9 11:26:00 UTC 2016 - dims...@opensuse.org
+
+- Fix condition to not build KDE plugin for SLE.
+
+-------------------------------------------------------------------
+Thu Apr 28 16:54:40 UTC 2016 - dims...@opensuse.org
+
+- Update to version 0.4.13:
+  + Allow linking webkit pacrunner against javascriptcore-4.0
+    (webkit2).
+  + Allow to disable building of the KDE module
+    (-DWITH_KDE=ON/OFF).
+  + Fix compilation errors with CLang on MacOSX.
+  + bindings: perl: Add an option to explicitly link against
+    libperl.so. Some distributions want to do it, other prefer not
+    to, the library is anyway in context of perl.
+  + config_kde: Add a basic cache and invalidation: performance
+    improvement for the KDE module.
+- Pass -DWITH_KDE=OFF to cmake when building core.
+- Replace pkgconfig(webkitgtk-3.0) BuildRequires with
+  pkgconfig(javascriptcoregtk-4.0): make use of the WebKit2 port.
+
+-------------------------------------------------------------------
+Fri Apr 15 22:00:25 UTC 2016 - mgo...@suse.com
+
+- Update to GNOME 3.20  Fate#318572
+
+-------------------------------------------------------------------
+Thu Jan 14 11:56:33 UTC 2016 - fcro...@suse.com
+
+- Disable building libproxy-config-kde on SLE.
+
+-------------------------------------------------------------------
+Tue Jan 12 16:46:37 UTC 2016 - dims...@opensuse.org
+
+- Update to version 0.4.12:
+  + Move development to github.com/libproxy/libproxy.
+  + Fix fd leak in get_pac (Bug #185).
+  + Detect running MATE session (Bug #186, Part1).
+  + Fix linking of perl bindings to pthread (Bug #182).
+  + Correctly detect spidermonky (mozjs185) (Bug #188).
+  + Stop pxgsettings from segfaulting on exit (Bug #192).
+  + Fix test #10 (Bug #189).
+  + Fix build on Mac OS X (Bug #183).
+  + Add a generic KDE Config module (fix crashes of Qt5 based
+    apps) (issue#4).
+- Drop upstream fixed patches:
+  + libproxy-pxgsettings-crash.patch
+  + libproxy-no-libperl.patch
+  + libproxy-pxgsettings-signals.patch
+- Rename libproxy1-config-kde4 subpackage to libproxy-config-kde,
+  following upstreams introduction of the generic config loader.
+- Require libKF5ConfigCore5 from libproxy1-config-kde (we don't
+  really need the library, but kreadconfig5 in this package).
+- Replace libkde4-devel and libqt4-devel BuildRequires with
+  libKF5ConfigCore5: the new KDE config parser interacts directly
+  with kreadconfig5 and does not link to Qt.
+
+-------------------------------------------------------------------
+Fri May 15 10:00:14 UTC 2015 - dims...@opensuse.org
+
+- Add libproxy-pxgsettings-signals.patch: Fix for pxgsettins not
+  actively monitoring gsetting changes. Due to recent changes in
+  GLib, only values are being monitored, that are read AFTER the
+  signal handler is attached.
+- Adjust baselibs.conf to match what is currenly being built.
+
+-------------------------------------------------------------------
+Wed Aug  6 09:51:00 UTC 2014 - fcro...@suse.com
+
+- Change Supplements to install libproxy1-config-gnome3 only if
+  gnome-session-core is installed to reduce minimal install size
+  (bnc#885455).
+
+-------------------------------------------------------------------
+Thu Sep  5 18:08:52 CEST 2013 - m...@suse.de
+
+- Add libproxy-no-libperl.patch: do not link the perl module
+  against libperl. We do not want a dependency on the libperl
+  library, as that would make as depend on the specific version of
+  perl. As the bindings are running in perl context, libperl can
+  be assumed to be loaded by that time.
+- Use perl_requires if it is defined.
+
+-------------------------------------------------------------------
+Mon Aug 26 18:07:54 UTC 2013 - dims...@opensuse.org
+
+- Add libproxy-pxgsettings-crash.patch: fix crash in pxgsettings
+  when it's closing down (bnc#836576).
+
+-------------------------------------------------------------------
+Fri Aug  2 14:41:10 UTC 2013 - dims...@opensuse.org
+
++++ 541 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.2:Update/.libproxy.14534.new.3486/libproxy-plugins.changes
New Changes file:

libproxy.changes: same change

New:
----
  0.4.15.tar.gz
  baselibs.conf
  libproxy-CVE-2020-25219.patch
  libproxy-fix-pac-buffer-overflow.patch
  libproxy-plugins.changes
  libproxy-plugins.spec
  libproxy.changes
  libproxy.spec
  pre_checkin.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libproxy-plugins.spec ++++++
#
# spec file for package libproxy-plugins
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define         build_core_not_modules 0
%define         build_mozjs 0
%if 0%{?suse_version}
%bcond_without mono
%else
%bcond_with mono
%endif
%define _name   libproxy
%if 0%{?build_snapshot}
%define _sourcename %{_name}
%else
%define _sourcename %{_name}-%{version}
%endif
%{!?python_sitelib:  %global python_sitelib  %(python -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?_assemblies_dir: %global _assemblies_dir %(pkg-config cecil 
--variable=assemblies_dir)}
Name:           libproxy-plugins
Version:        0.4.15
Release:        0
Summary:        Automatic proxy configuration management for applications
License:        GPL-2.0+ AND LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://code.google.com/p/libproxy/
Source:         https://github.com/libproxy/%{_name}/archive/%{version}.tar.gz
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM libproxy-CVE-2020-25219.patch boo#1176410 mgo...@suse.com 
-- Rewrite url::recvline to be nonrecursive.
Patch0:         libproxy-CVE-2020-25219.patch
# PATCH-FIX-UPSTREAM libproxy-fix-pac-buffer-overflow.patch boo#1177143 
mgo...@suse.com -- fix buffer overflow when PAC is enabled.
Patch1:         libproxy-fix-pac-buffer-overflow.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libmodman-devel
# netcfg is needed for the test suite.
BuildRequires:  netcfg
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel
%if !%{build_core_not_modules}
%if ! 0%{?windows}
BuildRequires:  NetworkManager-devel
BuildRequires:  dbus-1-devel
BuildRequires:  gconf2-devel
# For directory ownership, but also because we want to rebuild the modules if
# the library changed
BuildRequires:  libproxy1 = %{version}
BuildRequires:  perl
BuildRequires:  python-devel
BuildRequires:  python3-devel
%if 0%{?favor_gtk2}
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(webkit-1.0)
%else
BuildRequires:  pkgconfig(gio-2.0) >= 2.26
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(javascriptcoregtk-4.0)
%endif
%if 0%{?is_opensuse}
BuildRequires:  libKF5ConfigCore5
%endif
%if %{build_mozjs}
BuildRequires:  pkgconfig(mozjs-38)
%endif
%if %{with mono}
BuildRequires:  mono-devel
%endif
%endif
%endif

%description
libproxy is a library that provides automatic proxy configuration
management.

%if %build_core_not_modules
%package tools
Summary:        An example application using libproxy
Group:          System/Libraries
Requires:       libproxy1 = %{version}

%description tools
An example application that will use libproxy to give the results that can
be expected from other applications. It can be used to debug what would
happen in various cases.

%package devel
Summary:        Development files for libproxy, a library to do PAC/WPAD
Group:          Development/Libraries/C and C++
Requires:       libproxy1 = %{version}

%description devel
libproxy is a library that provides automatic proxy configuration
management.

This subpackage contains header files for developing applications
that want to make use of libproxy.

%package -n libproxy1
Summary:        Automatic proxy configuration management for applications
Group:          System/Libraries
%if !%{build_mozjs}
Obsoletes:      libproxy1-pacrunner-mozjs <= %{version}
%endif

%description -n libproxy1
libproxy is a library that provides automatic proxy configuration
management.

Proxy autoconfiguration (PAC) requires JavaScript (which most
applications do not have), and determing the PAC script location
requires a WPAD protocol implementation, which complicate proxy
support. libproxy exists to abstract this issue and provides
an answer how to reach a certain network resource.

%else
%if 0%{?favor_gtk2}
%package -n libproxy1-config-gnome
Summary:        Libproxy module for GNOME configuration
Group:          System/Libraries
%else
%package -n libproxy1-config-gnome3
Summary:        Libproxy module for GNOME3 configuration
Group:          System/Libraries
%endif
Requires:       libproxy1 = %{version}

%if 0%{?suse_version}
Recommends:     libproxy1-pacrunner = %{version}
%if 0%{?favor_gtk2}
Supplements:    packageand(libproxy1:gconf2)
%else
Supplements:    packageand(libproxy1:gnome-session-core)
%endif
%else
Requires:       libproxy1-pacrunner = %{version}
%endif
Provides:       libproxy-gnome = %{version}
Obsoletes:      libproxy-gnome < %{version}

%if 0%{?favor_gtk2}
%description -n libproxy1-config-gnome

%else
%description -n libproxy1-config-gnome3

%endif
A module to extend libproxy with capabilities to query GNOME about
proxy settings.

%package -n libproxy1-config-kde
Summary:        Libproxy module for KDE configuration
# We don't really need the library, but this package brings kreadconfig5
Group:          System/Libraries
Requires:       libKF5ConfigCore5
Requires:       libproxy1 = %{version}
Provides:       libproxy-kde = %{version}
Obsoletes:      libproxy-kde < %{version}
# A generic KDE config loader was introduced in 0.4.12
Obsoletes:      libproxy1-config-kde4 < 0.4.12
# The kde plugin requires 'qtpaths', which is part of libqt5-qtpaths in TW / 
libqt5-qttools in older releases
%if %{?suse_version} > 1320
Requires:       libqt5-qtpaths
%else
Requires:       libqt5-qttools
%endif
%if 0%{?suse_version}
Recommends:     libproxy1-pacrunner = %{version}
Supplements:    packageand(libproxy1:libkde4)
Supplements:    packageand(libproxy1:plasma5-session)
%else
Requires:       libproxy1-pacrunner = %{version}
%endif

%description -n libproxy1-config-kde
A module to extend libproxy with capabilities to query KDE4 about proxy
settings.

%package -n libproxy1-pacrunner-mozjs
Summary:        Libproxy module to support WPAD/PAC parsing via the Mozilla 
JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}
%if 0%{?suse_version}
Supplements:    packageand(libproxy1:libmozjs185-1_0)
%endif

%description -n libproxy1-pacrunner-mozjs
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.

%package -n libproxy1-pacrunner-webkit
Summary:        Libproxy module to support WPAD/PAC parsing via the WebKit 
JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}
%if 0%{?suse_version}
%if 0%{?favor_gtk2}
Supplements:    packageand(libproxy1:libjavascriptcoregtk-1_0-0)
%else
Supplements:    packageand(libproxy1:libjavascriptcoregtk-3_0-0)
%endif
%endif

%description -n libproxy1-pacrunner-webkit
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.

%package -n libproxy1-networkmanager
Summary:        Libproxy module for NetworkManager configuration
Group:          System/Libraries
Requires:       libproxy1 = %{version}
%if 0%{?suse_version}
Supplements:    packageand(libproxy1:NetworkManager)
%endif

%description -n libproxy1-networkmanager
A module to extend libproxy with capabilities to query NetworkManager
about network configuration changes.

%package -n python3-libproxy
Summary:        Python3 bindings for libproxy
Group:          Development/Languages/Python
Requires:       libproxy1 = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description -n python3-libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Python 3 bindings for libproxy.

%package -n python-libproxy
Summary:        Python bindings for libproxy
Group:          Development/Languages/Python
Requires:       libproxy1 = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%py_requires
%endif

%description -n python-libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Python 2 bindings for libproxy.

%package -n perl-Net-Libproxy
Summary:        Perl bindings for libproxy
Group:          Development/Languages/Perl
Requires:       libproxy1 = %{version}
%if 0%{?perl_requires:1}
%{perl_requires}
%else
# For Fedora at least perl = perl_version does not work.
Requires:       perl >= %{perl_version}
%endif

%description -n perl-Net-Libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Perl for libproxy.

%package -n libproxy-sharp
Summary:        .Net bindings for libproxy
Group:          Development/Languages/Mono
Requires:       libproxy1 = %{version}

%description -n libproxy-sharp
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Mono/.NET for libproxy.

%endif # build_core_not_modules

%prep
%setup -q -n %{_sourcename}
%patch0 -p1
%patch1 -p1
mkdir build

%build
cd build
export CXXFLAGS="%{optflags}"
export CFLAGS="%{optflags}"
%if 0%{?suse_version} < 1120 && 0%{?suse_version}
export CXXFLAGS="%{optflags} -DXP_UNIX"
%endif
%if 0%{?windows}
export CXXFLAGS="%{optflags} -fno-stack-protector -static-libgcc"
%endif
cmake \
%if 0%{?windows}
  -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32.cmake \
  -DBUILD_TESTING=False \
  -DWITH_DOTNET=OFF \
%else
  -DWITH_VALA=yes \
%if %{with mono}
  -DWITH_DOTNET=1 \
%endif
  -DFORCE_SYSTEM_LIBMODMAN=ON \
%endif
  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  -DBIN_INSTALL_DIR=%{_bindir} \
  -DLIB_INSTALL_DIR=%{_libdir} \
  -DMODULE_INSTALL_DIR=%{_libdir}/libproxy-%{version}/modules \
  -DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libproxy-%{version} \
  -DPYTHON_SITEPKG_DIR=%{python_sitelib} \
  -DSHARE_INSTALL_PREFIX=%{_datadir} \
  -DINCLUDE_INSTALL_DIR=%{_includedir} \
  -DPERL_VENDORINSTALL=yes \
  -DBIPR=0 \
%if %build_core_not_modules
  -DWITH_DOTNET=OFF \
  -DWITH_PERL=OFF \
  -DWITH_PYTHON2=OFF \
  -DWITH_PYTHON3=OFF \
%endif
%if %build_core_not_modules || ! 0%{?is_opensuse}
  -DWITH_KDE=OFF \
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1120
  -DCMAKE_BUILD_TYPE=DebugFull \
  -DCMAKE_INSTALL_CONFIG_NAME=DebugFull \
%else
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_INSTALL_CONFIG_NAME=RelWithDebInfo \
%endif
%if 0%{?favor_gtk2}
  -DWITH_WEBKIT3=OFF \
  -DWITH_GNOME3=OFF \
%else
  -DWITH_WEBKIT3=ON \
  -DWITH_GNOME3=ON \
%endif
..
make VERBOSE=1

%install
cd build
make DESTDIR=%{buildroot} install

# On Windows we also do not want to provide the static libraries.
%if 0%{?windows}
find %{buildroot}%{_libdir} -name '*.dll.a' -delete -print
rm %{buildroot}%{_libdir}/libmodman.dll
%endif

%if %build_core_not_modules
# Build the basic directory structure for the modules so we can
# own the directories in the main library package
install -d %{buildroot}%{_libexecdir}/libproxy-%{version}
install -d %{buildroot}%{_libdir}/%{name}-%{version}/modules
%else
# remove files that are part of the core
rm -f %{buildroot}%{_includedir}/*.h
# Delete all files that exist in the base libproxy package
rm -f %{buildroot}%{_bindir}/proxy%{?windows:.exe}
rm -f %{buildroot}%{_libdir}/libproxy.*
rm -f %{buildroot}%{_libdir}/pkgconfig/libproxy-1.0.pc
rm -f %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake
rm -f %{buildroot}%{_datadir}/vala/vapi/libproxy-1.0.vapi
%endif

%check
cd build
make test

%if %build_core_not_modules
%post -n libproxy1 -p /sbin/ldconfig

%postun -n libproxy1 -p /sbin/ldconfig

%files tools
%defattr(-, root, root)
%{_bindir}/proxy%{?windows:.exe}

%files -n libproxy1
%defattr(-, root, root)
%license COPYING
%doc README AUTHORS
%if ! 0%{?windows}
%{_libdir}/libproxy.so.*
%else
%{_libdir}/libproxy.dll
%endif
%dir %{_libexecdir}/libproxy-%{version}
%dir %{_libdir}/libproxy-%{version}
%dir %{_libdir}/libproxy-%{version}/modules

%files devel
%defattr(-, root, root)
%{_includedir}/*.h
%if ! 0%{?windows}
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/libproxy-1.0.vapi
%endif

%else
%if ! 0%{?windows}
%if 0%{?is_opensuse}
%files -n libproxy1-config-kde
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_kde.so
%endif

%if 0%{?favor_gtk2}
%files -n libproxy1-config-gnome
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_gnome.so
%{_libexecdir}/libproxy-%{version}/pxgconf
%else
%files -n libproxy1-config-gnome3
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_gnome3.so
%{_libexecdir}/libproxy-%{version}/pxgsettings
%endif

%files -n libproxy1-networkmanager
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/network_networkmanager.so

%files -n libproxy1-pacrunner-webkit
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/pacrunner_webkit.so

%if %{build_mozjs}
%files -n libproxy1-pacrunner-mozjs
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/pacrunner_mozjs.so
%endif

%files -n python-libproxy
%defattr(-, root, root)
%{python_sitelib}/*.py

%files -n python3-libproxy
%defattr(-, root, root)
%{python3_sitelib}/*.py

%files -n perl-Net-Libproxy
%defattr(-,root,root)
%dir %{perl_vendorarch}/Net
%dir %{perl_vendorarch}/auto/Net
%dir %{perl_vendorarch}/auto/Net/Libproxy
%{perl_vendorarch}/Net/Libproxy.pm
%{perl_vendorarch}/auto/Net/Libproxy/Libproxy.so

%if %{with mono}
%files -n libproxy-sharp
%defattr(-, root, root)
%{_assemblies_dir}/gac/libproxy-sharp
%{_assemblies_dir}/libproxy-sharp
%{_libdir}/pkgconfig/libproxy-sharp-1.0.pc
%endif
%endif
%endif

%changelog
++++++ libproxy.spec ++++++
#
# spec file for package libproxy
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define         build_core_not_modules 1
%define         build_mozjs 0
%if 0%{?suse_version}
%bcond_without mono
%else
%bcond_with mono
%endif
%define _name   libproxy
%if 0%{?build_snapshot}
%define _sourcename %{_name}
%else
%define _sourcename %{_name}-%{version}
%endif
%{!?python_sitelib:  %global python_sitelib  %(python -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?_assemblies_dir: %global _assemblies_dir %(pkg-config cecil 
--variable=assemblies_dir)}
Name:           libproxy
Version:        0.4.15
Release:        0
Summary:        Automatic proxy configuration management for applications
License:        GPL-2.0+ AND LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://code.google.com/p/libproxy/
Source:         https://github.com/libproxy/%{_name}/archive/%{version}.tar.gz
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM libproxy-CVE-2020-25219.patch boo#1176410 mgo...@suse.com 
-- Rewrite url::recvline to be nonrecursive.
Patch0:         libproxy-CVE-2020-25219.patch
# PATCH-FIX-UPSTREAM libproxy-fix-pac-buffer-overflow.patch boo#1177143 
mgo...@suse.com -- fix buffer overflow when PAC is enabled.
Patch1:         libproxy-fix-pac-buffer-overflow.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libmodman-devel
# netcfg is needed for the test suite.
BuildRequires:  netcfg
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel
%if !%{build_core_not_modules}
%if ! 0%{?windows}
BuildRequires:  NetworkManager-devel
BuildRequires:  dbus-1-devel
BuildRequires:  gconf2-devel
# For directory ownership, but also because we want to rebuild the modules if
# the library changed
BuildRequires:  libproxy1 = %{version}
BuildRequires:  perl
BuildRequires:  python-devel
BuildRequires:  python3-devel
%if 0%{?favor_gtk2}
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(webkit-1.0)
%else
BuildRequires:  pkgconfig(gio-2.0) >= 2.26
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(javascriptcoregtk-4.0)
%endif
%if 0%{?is_opensuse}
BuildRequires:  libKF5ConfigCore5
%endif
%if %{build_mozjs}
BuildRequires:  pkgconfig(mozjs-38)
%endif
%if %{with mono}
BuildRequires:  mono-devel
%endif
%endif
%endif

%description
libproxy is a library that provides automatic proxy configuration
management.

%if %build_core_not_modules
%package tools
Summary:        An example application using libproxy
Group:          System/Libraries
Requires:       libproxy1 = %{version}

%description tools
An example application that will use libproxy to give the results that can
be expected from other applications. It can be used to debug what would
happen in various cases.

%package devel
Summary:        Development files for libproxy, a library to do PAC/WPAD
Group:          Development/Libraries/C and C++
Requires:       libproxy1 = %{version}

%description devel
libproxy is a library that provides automatic proxy configuration
management.

This subpackage contains header files for developing applications
that want to make use of libproxy.

%package -n libproxy1
Summary:        Automatic proxy configuration management for applications
Group:          System/Libraries
%if !%{build_mozjs}
Obsoletes:      libproxy1-pacrunner-mozjs <= %{version}
%endif

%description -n libproxy1
libproxy is a library that provides automatic proxy configuration
management.

Proxy autoconfiguration (PAC) requires JavaScript (which most
applications do not have), and determing the PAC script location
requires a WPAD protocol implementation, which complicate proxy
support. libproxy exists to abstract this issue and provides
an answer how to reach a certain network resource.

%else
%if 0%{?favor_gtk2}
%package -n libproxy1-config-gnome
Summary:        Libproxy module for GNOME configuration
Group:          System/Libraries
%else
%package -n libproxy1-config-gnome3
Summary:        Libproxy module for GNOME3 configuration
Group:          System/Libraries
%endif
Requires:       libproxy1 = %{version}

%if 0%{?suse_version}
Recommends:     libproxy1-pacrunner = %{version}
%if 0%{?favor_gtk2}
Supplements:    packageand(libproxy1:gconf2)
%else
Supplements:    packageand(libproxy1:gnome-session-core)
%endif
%else
Requires:       libproxy1-pacrunner = %{version}
%endif
Provides:       libproxy-gnome = %{version}
Obsoletes:      libproxy-gnome < %{version}

%if 0%{?favor_gtk2}
%description -n libproxy1-config-gnome

%else
%description -n libproxy1-config-gnome3

%endif
A module to extend libproxy with capabilities to query GNOME about
proxy settings.

%package -n libproxy1-config-kde
Summary:        Libproxy module for KDE configuration
# We don't really need the library, but this package brings kreadconfig5
Group:          System/Libraries
Requires:       libKF5ConfigCore5
Requires:       libproxy1 = %{version}
Provides:       libproxy-kde = %{version}
Obsoletes:      libproxy-kde < %{version}
# A generic KDE config loader was introduced in 0.4.12
Obsoletes:      libproxy1-config-kde4 < 0.4.12
# The kde plugin requires 'qtpaths', which is part of libqt5-qtpaths in TW / 
libqt5-qttools in older releases
%if %{?suse_version} > 1320
Requires:       libqt5-qtpaths
%else
Requires:       libqt5-qttools
%endif
%if 0%{?suse_version}
Recommends:     libproxy1-pacrunner = %{version}
Supplements:    packageand(libproxy1:libkde4)
Supplements:    packageand(libproxy1:plasma5-session)
%else
Requires:       libproxy1-pacrunner = %{version}
%endif

%description -n libproxy1-config-kde
A module to extend libproxy with capabilities to query KDE4 about proxy
settings.

%package -n libproxy1-pacrunner-mozjs
Summary:        Libproxy module to support WPAD/PAC parsing via the Mozilla 
JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}
%if 0%{?suse_version}
Supplements:    packageand(libproxy1:libmozjs185-1_0)
%endif

%description -n libproxy1-pacrunner-mozjs
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.

%package -n libproxy1-pacrunner-webkit
Summary:        Libproxy module to support WPAD/PAC parsing via the WebKit 
JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}
%if 0%{?suse_version}
%if 0%{?favor_gtk2}
Supplements:    packageand(libproxy1:libjavascriptcoregtk-1_0-0)
%else
Supplements:    packageand(libproxy1:libjavascriptcoregtk-3_0-0)
%endif
%endif

%description -n libproxy1-pacrunner-webkit
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.

%package -n libproxy1-networkmanager
Summary:        Libproxy module for NetworkManager configuration
Group:          System/Libraries
Requires:       libproxy1 = %{version}
%if 0%{?suse_version}
Supplements:    packageand(libproxy1:NetworkManager)
%endif

%description -n libproxy1-networkmanager
A module to extend libproxy with capabilities to query NetworkManager
about network configuration changes.

%package -n python3-libproxy
Summary:        Python3 bindings for libproxy
Group:          Development/Languages/Python
Requires:       libproxy1 = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description -n python3-libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Python 3 bindings for libproxy.

%package -n python-libproxy
Summary:        Python bindings for libproxy
Group:          Development/Languages/Python
Requires:       libproxy1 = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%py_requires
%endif

%description -n python-libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Python 2 bindings for libproxy.

%package -n perl-Net-Libproxy
Summary:        Perl bindings for libproxy
Group:          Development/Languages/Perl
Requires:       libproxy1 = %{version}
%if 0%{?perl_requires:1}
%{perl_requires}
%else
# For Fedora at least perl = perl_version does not work.
Requires:       perl >= %{perl_version}
%endif

%description -n perl-Net-Libproxy
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Perl for libproxy.

%package -n libproxy-sharp
Summary:        .Net bindings for libproxy
Group:          Development/Languages/Mono
Requires:       libproxy1 = %{version}

%description -n libproxy-sharp
libproxy is a library that provides automatic proxy configuration
management.

This package contains the Mono/.NET for libproxy.

%endif # build_core_not_modules

%prep
%setup -q -n %{_sourcename}
%patch0 -p1
%patch1 -p1
mkdir build

%build
cd build
export CXXFLAGS="%{optflags}"
export CFLAGS="%{optflags}"
%if 0%{?suse_version} < 1120 && 0%{?suse_version}
export CXXFLAGS="%{optflags} -DXP_UNIX"
%endif
%if 0%{?windows}
export CXXFLAGS="%{optflags} -fno-stack-protector -static-libgcc"
%endif
cmake \
%if 0%{?windows}
  -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32.cmake \
  -DBUILD_TESTING=False \
  -DWITH_DOTNET=OFF \
%else
  -DWITH_VALA=yes \
%if %{with mono}
  -DWITH_DOTNET=1 \
%endif
  -DFORCE_SYSTEM_LIBMODMAN=ON \
%endif
  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  -DBIN_INSTALL_DIR=%{_bindir} \
  -DLIB_INSTALL_DIR=%{_libdir} \
  -DMODULE_INSTALL_DIR=%{_libdir}/libproxy-%{version}/modules \
  -DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libproxy-%{version} \
  -DPYTHON_SITEPKG_DIR=%{python_sitelib} \
  -DSHARE_INSTALL_PREFIX=%{_datadir} \
  -DINCLUDE_INSTALL_DIR=%{_includedir} \
  -DPERL_VENDORINSTALL=yes \
  -DBIPR=0 \
%if %build_core_not_modules
  -DWITH_DOTNET=OFF \
  -DWITH_PERL=OFF \
  -DWITH_PYTHON2=OFF \
  -DWITH_PYTHON3=OFF \
%endif
%if %build_core_not_modules || ! 0%{?is_opensuse}
  -DWITH_KDE=OFF \
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1120
  -DCMAKE_BUILD_TYPE=DebugFull \
  -DCMAKE_INSTALL_CONFIG_NAME=DebugFull \
%else
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_INSTALL_CONFIG_NAME=RelWithDebInfo \
%endif
%if 0%{?favor_gtk2}
  -DWITH_WEBKIT3=OFF \
  -DWITH_GNOME3=OFF \
%else
  -DWITH_WEBKIT3=ON \
  -DWITH_GNOME3=ON \
%endif
..
make VERBOSE=1

%install
cd build
make DESTDIR=%{buildroot} install

# On Windows we also do not want to provide the static libraries.
%if 0%{?windows}
find %{buildroot}%{_libdir} -name '*.dll.a' -delete -print
rm %{buildroot}%{_libdir}/libmodman.dll
%endif

%if %build_core_not_modules
# Build the basic directory structure for the modules so we can
# own the directories in the main library package
install -d %{buildroot}%{_libexecdir}/libproxy-%{version}
install -d %{buildroot}%{_libdir}/%{name}-%{version}/modules
%else
# remove files that are part of the core
rm -f %{buildroot}%{_includedir}/*.h
# Delete all files that exist in the base libproxy package
rm -f %{buildroot}%{_bindir}/proxy%{?windows:.exe}
rm -f %{buildroot}%{_libdir}/libproxy.*
rm -f %{buildroot}%{_libdir}/pkgconfig/libproxy-1.0.pc
rm -f %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake
rm -f %{buildroot}%{_datadir}/vala/vapi/libproxy-1.0.vapi
%endif

%check
cd build
make test

%if %build_core_not_modules
%post -n libproxy1 -p /sbin/ldconfig

%postun -n libproxy1 -p /sbin/ldconfig

%files tools
%defattr(-, root, root)
%{_bindir}/proxy%{?windows:.exe}

%files -n libproxy1
%defattr(-, root, root)
%license COPYING
%doc README AUTHORS
%if ! 0%{?windows}
%{_libdir}/libproxy.so.*
%else
%{_libdir}/libproxy.dll
%endif
%dir %{_libexecdir}/libproxy-%{version}
%dir %{_libdir}/libproxy-%{version}
%dir %{_libdir}/libproxy-%{version}/modules

%files devel
%defattr(-, root, root)
%{_includedir}/*.h
%if ! 0%{?windows}
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/libproxy-1.0.vapi
%endif

%else
%if ! 0%{?windows}
%if 0%{?is_opensuse}
%files -n libproxy1-config-kde
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_kde.so
%endif

%if 0%{?favor_gtk2}
%files -n libproxy1-config-gnome
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_gnome.so
%{_libexecdir}/libproxy-%{version}/pxgconf
%else
%files -n libproxy1-config-gnome3
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/config_gnome3.so
%{_libexecdir}/libproxy-%{version}/pxgsettings
%endif

%files -n libproxy1-networkmanager
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/network_networkmanager.so

%files -n libproxy1-pacrunner-webkit
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/pacrunner_webkit.so

%if %{build_mozjs}
%files -n libproxy1-pacrunner-mozjs
%defattr(-, root, root)
%{_libdir}/libproxy-%{version}/modules/pacrunner_mozjs.so
%endif

%files -n python-libproxy
%defattr(-, root, root)
%{python_sitelib}/*.py

%files -n python3-libproxy
%defattr(-, root, root)
%{python3_sitelib}/*.py

%files -n perl-Net-Libproxy
%defattr(-,root,root)
%dir %{perl_vendorarch}/Net
%dir %{perl_vendorarch}/auto/Net
%dir %{perl_vendorarch}/auto/Net/Libproxy
%{perl_vendorarch}/Net/Libproxy.pm
%{perl_vendorarch}/auto/Net/Libproxy/Libproxy.so

%if %{with mono}
%files -n libproxy-sharp
%defattr(-, root, root)
%{_assemblies_dir}/gac/libproxy-sharp
%{_assemblies_dir}/libproxy-sharp
%{_libdir}/pkgconfig/libproxy-sharp-1.0.pc
%endif
%endif
%endif

%changelog
++++++ baselibs.conf ++++++
libproxy1
#libproxy1-config-gnome
#  supplements "packageand(libproxy1-<targettype>:libproxy1-config-gnome)"
libproxy1-config-gnome3
  supplements "packageand(libproxy1-<targettype>:libproxy1-config-gnome3)"
libproxy1-config-kde
  supplements "packageand(libproxy1-<targettype>:libproxy1-config-kde)"
#libproxy1-pacrunner-mozjs
#  supplements "packageand(libproxy1-<targettype>:libproxy1-config-mozjs)"
libproxy1-networkmanager
  supplements 
"packageand(libproxy1-<targettype>:libproxy1-config-networkmanager)"
libproxy1-pacrunner-webkit
  supplements "packageand(libproxy1-<targettype>:libproxy1-config-webkit)"
++++++ libproxy-CVE-2020-25219.patch ++++++
>From a83dae404feac517695c23ff43ce1e116e2bfbe0 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanz...@gnome.org>
Date: Wed, 9 Sep 2020 11:12:02 -0500
Subject: [PATCH] Rewrite url::recvline to be nonrecursive

This function processes network input. It's semi-trusted, because the
PAC ought to be trusted. But we still shouldn't allow it to control how
far we recurse. A malicious PAC can cause us to overflow the stack by
sending a sufficiently-long line without any '\n' character.

Also, this function failed to properly handle EINTR, so let's fix that
too, for good measure.

Fixes #134
---
 libproxy/url.cpp | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index ee776b2..68d69cd 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -388,16 +388,24 @@ string url::to_string() const {
        return m_orig;
 }
 
-static inline string recvline(int fd) {
-       // Read a character.
-       // If we don't get a character, return empty string.
-       // If we are at the end of the line, return empty string.
-       char c = '\0';
-       
-       if (recv(fd, &c, 1, 0) != 1 || c == '\n')
-               return "";
-
-       return string(1, c) + recvline(fd);
+static string recvline(int fd) {
+       string line;
+       int ret;
+
+       // Reserve arbitrary amount of space to avoid small memory 
reallocations.
+       line.reserve(128);
+
+       do {
+               char c;
+               ret = recv(fd, &c, 1, 0);
+               if (ret == 1) {
+                       if (c == '\n')
+                               return line;
+                       line += c;
+               }
+       } while (ret == 1 || (ret == -1 && errno == EINTR));
+
+       return line;
 }
 
 char* url::get_pac() {
-- 
2.28.0

++++++ libproxy-fix-pac-buffer-overflow.patch ++++++
>From 4411b523545b22022b4be7d0cac25aa170ae1d3e Mon Sep 17 00:00:00 2001
From: Fei Li <lifeibi...@gmail.com>
Date: Fri, 17 Jul 2020 02:18:37 +0800
Subject: [PATCH] Fix buffer overflow when PAC is enabled

The bug was found on Windows 10 (MINGW64) when PAC is enabled. It turned
out to be the large PAC file (more than 102400 bytes) returned by a
local proxy program with no content-length present.
---
 libproxy/url.cpp | 44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index ee776b2..8684086 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -54,7 +54,7 @@ using namespace std;
 #define PAC_MIME_TYPE_FB "text/plain"
 
 // This is the maximum pac size (to avoid memory attacks)
-#define PAC_MAX_SIZE 102400
+#define PAC_MAX_SIZE 0x800000
 // This is the default block size to use when receiving via HTTP
 #define PAC_HTTP_BLOCK_SIZE 512
 
@@ -478,15 +478,13 @@ char* url::get_pac() {
                }
 
                // Get content
-               unsigned int recvd = 0;
-               buffer = new char[PAC_MAX_SIZE];
-               memset(buffer, 0, PAC_MAX_SIZE);
+               std::vector<char> dynamic_buffer;
                do {
                        unsigned int chunk_length;
 
                        if (chunked) {
                                // Discard the empty line if we received a 
previous chunk
-                               if (recvd > 0) recvline(sock);
+                               if (!dynamic_buffer.empty()) recvline(sock);
 
                                // Get the chunk-length line as an integer
                                if (sscanf(recvline(sock).c_str(), "%x", 
&chunk_length) != 1 || chunk_length == 0) break;
@@ -498,21 +496,41 @@ char* url::get_pac() {
 
                        if (content_length >= PAC_MAX_SIZE) break;
 
-                       while (content_length == 0 || recvd != content_length) {
-                               int r = recv(sock, buffer + recvd,
-                                            content_length == 0 ? 
PAC_HTTP_BLOCK_SIZE
-                                                                : 
content_length - recvd, 0);
+                       while (content_length == 0 || dynamic_buffer.size() != 
content_length) {
+                               // Calculate length to recv
+                               unsigned int length_to_read = 
PAC_HTTP_BLOCK_SIZE;
+                               if (content_length > 0)
+                                       length_to_read = content_length - 
dynamic_buffer.size();
+
+                               // Prepare buffer
+                               dynamic_buffer.resize(dynamic_buffer.size() + 
length_to_read);
+
+                               int r = recv(sock, dynamic_buffer.data() + 
dynamic_buffer.size() - length_to_read, length_to_read, 0);
+
+                               // Shrink buffer to fit
+                               if (r >= 0)
+                                       
dynamic_buffer.resize(dynamic_buffer.size() - length_to_read + r);
+
+                               // PAC size too large, discard
+                               if (dynamic_buffer.size() >= PAC_MAX_SIZE) {
+                                       chunked = false;
+                                       dynamic_buffer.clear();
+                                       break;
+                               }
+
                                if (r <= 0) {
                                        chunked = false;
                                        break;
                                }
-                               recvd += r;
                        }
                } while (chunked);
 
-               if (content_length != 0 && string(buffer).size() != 
content_length) {
-                       delete[] buffer;
-                       buffer = NULL;
+               if (content_length == 0 || content_length == 
dynamic_buffer.size()) {
+                       buffer = new char[dynamic_buffer.size() + 1];
+                       if (!dynamic_buffer.empty()) {
+                               memcpy(buffer, dynamic_buffer.data(), 
dynamic_buffer.size());
+                       }
+                       buffer[dynamic_buffer.size()] = '\0';
                }
        }
 
++++++ pre_checkin.sh ++++++
#!/bin/sh

cp libproxy.spec libproxy-plugins.spec
sed -i "s/\(%define *build_core_not_modules *\)1/\10/;s/\(Name: 
*\)libproxy/\1libproxy-plugins/" libproxy-plugins.spec
cp libproxy.changes libproxy-plugins.changes

Reply via email to