From 0a90bea34d76ea4cd51aea61876218d059830045 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 18 Jun 2021 17:16:18 +0530 Subject: gnu: linkchecker: Update to 10.0.1. * gnu/packages/web.scm (linkchecker): Update to 10.0.1. [source]: Remove patches. [inputs]: Add python-beautifulsoup4. Replace python2-dnspython-1.16, python2-pyxdg and python2-requests with python-dnspython, python-pyxdg and python-requests respectively. [native-inputs]: Replace python2-pytest, python2-miniboa and python2-parameterized with python-pytest, python-miniboa and python-parameterized respectively. [arguments]: Use python 3. Replace check phase instead of deleting the standard phase and adding a custom one. Use add-installed-pythonpath instead of setting PYTHONPATH directly. Support disabling of tests with tests?. [home-page]: Update URI. * gnu/packages/patches/linkchecker-tests-require-network.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Unregister it. --- .../linkchecker-tests-require-network.patch | 182 --------------------- 1 file changed, 182 deletions(-) delete mode 100644 gnu/packages/patches/linkchecker-tests-require-network.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/linkchecker-tests-require-network.patch b/gnu/packages/patches/linkchecker-tests-require-network.patch deleted file mode 100644 index f3e488cec2..0000000000 --- a/gnu/packages/patches/linkchecker-tests-require-network.patch +++ /dev/null @@ -1,182 +0,0 @@ -From f24c88a0732024028fffe0372039a847e91722ea Mon Sep 17 00:00:00 2001 -From: Christopher Baines -Date: Tue, 1 Jan 2019 22:36:29 +0000 -Subject: [PATCH] Mark more tests that require the network - -I believe all these tests require the network, at least they seem to -fail if it's I run them without connecting my computer to the web. - -I'm looking at this as part of packaging linkchecker for GNU Guix, -where the package is build and the tests are run in a isolated -environment, intentionally without network access, to avoid issues -with non-reproducible package builds. ---- - tests/checker/test_http.py | 2 ++ - tests/checker/test_http_misc.py | 2 ++ - tests/checker/test_http_redirect.py | 2 ++ - tests/checker/test_httpbin.py | 5 +++++ - tests/checker/test_misc.py | 4 ++++ - tests/checker/test_whitespace.py | 3 +++ - 6 files changed, 18 insertions(+) - -diff --git a/tests/checker/test_http.py b/tests/checker/test_http.py -index e4c1e097..8a8af567 100644 ---- a/tests/checker/test_http.py -+++ b/tests/checker/test_http.py -@@ -20,6 +20,7 @@ - - import pytest - -+from tests import need_network - from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler - - class TestHttp (HttpServerTest): -@@ -29,6 +30,7 @@ def __init__(self, methodName='runTest'): - super(TestHttp, self).__init__(methodName=methodName) - self.handler = CookieRedirectHttpRequestHandler - -+ @need_network - def test_html (self): - confargs = dict(recursionlevel=1) - self.file_test("http.html", confargs=confargs) -diff --git a/tests/checker/test_http_misc.py b/tests/checker/test_http_misc.py -index 9922d85f..c6b6afdb 100644 ---- a/tests/checker/test_http_misc.py -+++ b/tests/checker/test_http_misc.py -@@ -20,11 +20,13 @@ - import os - import sys - from .httpserver import HttpServerTest -+from tests import need_network - from linkcheck.network import iputil - - class TestHttpMisc (HttpServerTest): - """Test http:// misc link checking.""" - -+ @need_network - def test_html (self): - self.swf_test() - self.obfuscate_test() -diff --git a/tests/checker/test_http_redirect.py b/tests/checker/test_http_redirect.py -index f212d98e..2253a70d 100644 ---- a/tests/checker/test_http_redirect.py -+++ b/tests/checker/test_http_redirect.py -@@ -17,6 +17,7 @@ - """ - Test http checking. - """ -+from tests import need_network - from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler - - class TestHttpRedirect (HttpServerTest): -@@ -26,6 +27,7 @@ def __init__(self, methodName='runTest'): - super(TestHttpRedirect, self).__init__(methodName=methodName) - self.handler = CookieRedirectHttpRequestHandler - -+ @need_network - def test_redirect (self): - self.redirect1() - self.redirect2() -diff --git a/tests/checker/test_httpbin.py b/tests/checker/test_httpbin.py -index 0319c2f6..4c8fa846 100644 ---- a/tests/checker/test_httpbin.py -+++ b/tests/checker/test_httpbin.py -@@ -18,6 +18,7 @@ - Test http stuff with httpbin.org. - """ - import re -+from tests import need_network - from . import LinkCheckTest - - -@@ -30,6 +31,7 @@ def get_httpbin_url(path): - class TestHttpbin(LinkCheckTest): - """Test http:// link redirection checking.""" - -+ @need_network - def test_http_link(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -@@ -48,6 +50,7 @@ def test_http_link(self): - ] - self.direct(url, resultlines, recursionlevel=1) - -+ @need_network - def test_basic_auth(self): - user = u"testuser" - password = u"testpassword" -@@ -67,6 +70,7 @@ def test_basic_auth(self): - ] - self.direct(url, resultlines, confargs=confargs) - -+ @need_network - def test_http_refresh_header(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -@@ -85,6 +89,7 @@ def test_http_refresh_header(self): - ] - self.direct(url, resultlines, recursionlevel=1) - -+ @need_network - def test_http_content_location_header(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -diff --git a/tests/checker/test_misc.py b/tests/checker/test_misc.py -index 2e4cfd07..f9591f9d 100644 ---- a/tests/checker/test_misc.py -+++ b/tests/checker/test_misc.py -@@ -17,6 +17,7 @@ - """ - Test miscellaneous html tag parsing and URL types - """ -+from tests import need_network - from . import LinkCheckTest - - -@@ -25,15 +26,18 @@ class TestMisc (LinkCheckTest): - Test misc link types. - """ - -+ @need_network - def test_misc (self): - self.file_test("misc.html") - - def test_html5 (self): - self.file_test("html5.html") - -+ @need_network - def test_archive (self): - self.file_test("archive.html") - -+ @need_network - def test_itms_services(self): - url = u"itms-services:?action=download-manifest&url=http://www.example.com/" - resultlines = [ -diff --git a/tests/checker/test_whitespace.py b/tests/checker/test_whitespace.py -index 609c108a..fc2727d6 100644 ---- a/tests/checker/test_whitespace.py -+++ b/tests/checker/test_whitespace.py -@@ -17,6 +17,7 @@ - """ - Test whitespace handling. - """ -+from tests import need_network - from . import LinkCheckTest - - -@@ -25,6 +26,7 @@ class TestWhitespace (LinkCheckTest): - Test whitespace in URLs. - """ - -+ @need_network - def test_leading_whitespace (self): - # Leading whitespace - url = u" http://www.example.org/" -@@ -50,6 +52,7 @@ def test_leading_whitespace (self): - ] - self.direct(url, resultlines) - -+ @need_network - def test_trailing_whitespace (self): - # Trailing whitespace - url = u"http://www.example.org/ " -- cgit v1.2.3 From 30a04c00beb3b0bc3799f27caf05bedb5094c0c5 Mon Sep 17 00:00:00 2001 From: Jack Hill Date: Fri, 18 Jun 2021 18:15:46 +0200 Subject: gnu: Add tlf. * gnu/packages/patches/tlf-support-hamlib-4.2+.patch: New file. * gnu/local.mk: Add it. * gnu/packages/radio.scm (tlf): New variable. Signed-off-by: Guillaume Le Vaillant --- gnu/local.mk | 1 + gnu/packages/patches/tlf-support-hamlib-4.2+.patch | 66 ++++++++++++++++++++++ gnu/packages/radio.scm | 62 ++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 gnu/packages/patches/tlf-support-hamlib-4.2+.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 375883de03..f7ff9af997 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1753,6 +1753,7 @@ dist_patch_DATA = \ %D%/packages/patches/tipp10-qt5.patch \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/tla2tools-build-xml.patch \ + %D%/packages/patches/tlf-support-hamlib-4.2+.patch \ %D%/packages/patches/tor-fix-build-with-gcc-7.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ diff --git a/gnu/packages/patches/tlf-support-hamlib-4.2+.patch b/gnu/packages/patches/tlf-support-hamlib-4.2+.patch new file mode 100644 index 0000000000..3c5db10010 --- /dev/null +++ b/gnu/packages/patches/tlf-support-hamlib-4.2+.patch @@ -0,0 +1,66 @@ +From 295fa956f899af37acb6bda9c76ad77748eb9a4a Mon Sep 17 00:00:00 2001 +From: Ervin Hegedus +Date: Sat, 5 Jun 2021 09:23:06 +0200 +Subject: [PATCH] Quick fix for changing of Hamlib's FILPATHLEN macro + +This patch was prepared for Guix by Jack Hill by +squashing together the changes from upstream #268 +. + +It allows the released version of Tlf to build against the version 4.2 of +hamlib in Guix. + +--- + src/sendqrg.c | 6 +++--- + src/sendqrg.h | 10 ++++++++++ + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/sendqrg.c b/src/sendqrg.c +index ceeb356..5d4420e 100644 +--- a/src/sendqrg.c ++++ b/src/sendqrg.c +@@ -87,7 +87,7 @@ int init_tlf_rig(void) { + + rigportname[strlen(rigportname) - 1] = '\0'; // remove '\n' + strncpy(my_rig->state.rigport.pathname, rigportname, +- FILPATHLEN - 1); ++ TLFFILPATHLEN - 1); + + caps = my_rig->caps; + +@@ -104,9 +104,9 @@ int init_tlf_rig(void) { + if (dcd_type != RIG_DCD_NONE) + my_rig->state.dcdport.type.dcd = dcd_type; + if (ptt_file) +- strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN); ++ strncpy(my_rig->state.pttport.pathname, ptt_file, TLFFILPATHLEN); + if (dcd_file) +- strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN); ++ strncpy(my_rig->state.dcdport.pathname, dcd_file, TLFFILPATHLEN); + + my_rig->state.rigport.parm.serial.rate = serial_rate; + +diff --git a/src/sendqrg.h b/src/sendqrg.h +index 8c53f2e..1ef85a6 100644 +--- a/src/sendqrg.h ++++ b/src/sendqrg.h +@@ -23,6 +23,16 @@ + + #include + ++#ifdef HAMLIB_FILPATHLEN ++ #define TLFFILPATHLEN HAMLIB_FILPATHLEN ++#else ++ #ifdef FILPATHLEN ++ #define TLFFILPATHLEN FILPATHLEN ++ #else ++ #error "(HAMLIB_)FILPATHLEN macro not found" ++ #endif ++#endif ++ + int init_tlf_rig(void); + void close_tlf_rig(RIG *my_rig); + +-- +2.32.0 + diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 618b2cfeaa..991d2e3a2e 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2020 Charlie Ritter ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2021 João Pedro Simas +;;; Copyright © 2021 Jack Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages algebra) #:use-module (gnu packages astronomy) @@ -68,6 +70,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) @@ -1065,6 +1068,65 @@ users.") "--with-tcl-binding" "--with-xml-support"))))) +(define-public tlf + (package + (name "tlf") + (version "1.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tlf/tlf") + (commit (string-append "tlf-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xpgs4k27pjd9mianfknknp6mf34365bcp96wrv5xh4dhph573rj")) + (patches + (search-patches "tlf-support-hamlib-4.2+.patch")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags + (list "--enable-fldigi-xmlrpc"))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (inputs + `(("cmocka" ,cmocka) + ("glib" ,glib) + ("hamlib" ,hamlib) + ("libusb" ,libusb) ;`Requires.private: libusb-1.0` in hamlib pkg-config + ("ncurses" ,ncurses) + ("xmlrpc-c" ,xmlrpc-c))) + (home-page "https://tlf.github.io/") + (synopsis "Amateur radio contest logging for the terminal") + (description "TLF is a @acronym{Text User Interface, TUI} amateur radio +contest logging program. It integrates with radios supported by hamlib and +other ham radio programs like fldigi. Many contests are supported including: + +@itemize +@item CQWW (SO, M/S and M/M) +@item WPX (SO, M/S and M/M) +@item ARRL Sweepstakes (SO, M/S ) +@item EU SPRINT +@item EUHFC +@item ARRL-DX (both sides) +@item ARRL-FD +@item ARRL 10m +@item ARRL 160m +@item Region1 field day +@item SP DX contest +@item PACC (both sides) +@item NRAU - scandinavian +@item Wysiwyg mults mode (per band or per contest) +@item WAEDX +@end itemize + +It also supports connecting to DX clusters, log synchronization with other TLF +instances over the network, and general QSO and DXpedition logging.") + (license license:gpl2+))) + (define-public wsjtx (package (name "wsjtx") -- cgit v1.2.3 From b6fc274637c69929e7811b40bf9b99d3e8df8360 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Fri, 18 Jun 2021 15:33:59 +0000 Subject: gnu: widelands: Update to 1.0. * gnu/packages/games.scm (widelands): Update to 1.0. [source]: Download from github as there is no tarball for v1.0 on their website. [inputs]: Add curl. * gnu/packages/patches/widelands-system-wide_minizip.patch: Adjust for 1.0. CmakeLists.txt now already defines CMAKE_MODULE_PATH, so I've moved FindMinizip.cmake to this path. Signed-off-by: Nicolas Goaziou --- gnu/packages/games.scm | 16 ++++---- .../patches/widelands-system-wide_minizip.patch | 44 ++++++++-------------- 2 files changed, 25 insertions(+), 35 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index fca25294db..9944c0dcc6 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -5215,15 +5215,16 @@ tactics.") (define-public widelands (package (name "widelands") - (version "21") + (version "1.0") (source (origin - (method url-fetch) - (uri (string-append "https://launchpad.net/widelands/" - "build" version "/build" version "/+download/" - "widelands-build" version "-source.tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/widelands/widelands") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0mz3jily0w1zxxqbnkqrp6hl88xhrwzbil9crq7gpcwidx60w7k0")) + (base32 "1hw51binnbia15mj1gzx1cbk3cw9r91sisqci2qzcy4ahxiadnw0")) (modules '((guix build utils))) (snippet '(begin @@ -5263,7 +5264,8 @@ tactics.") `(("gettext" ,gettext-minimal) ("python" ,python-wrapper))) (inputs - `(("boost" ,boost) + `(("curl" ,curl) + ("boost" ,boost) ("glew" ,glew) ("icu4c" ,icu4c) ("libpng" ,libpng) diff --git a/gnu/packages/patches/widelands-system-wide_minizip.patch b/gnu/packages/patches/widelands-system-wide_minizip.patch index 1fac0d5396..b59fed7531 100644 --- a/gnu/packages/patches/widelands-system-wide_minizip.patch +++ b/gnu/packages/patches/widelands-system-wide_minizip.patch @@ -2,41 +2,29 @@ Description: use the system-wide minizip instead of the embeeded one if found. Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147 . Thanks to Fòram na Gàidhlig for the patch. - -I just added this line to make its use easier: - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules) === modified file 'CMakeLists.txt' --- - CMakeLists.txt | 3 +++ - Modules/FindMinizip.cmake | 37 +++++++++++++++++++++++++++++++++++++ - cmake/WlFunctions.cmake | 7 +++++++ - src/io/CMakeLists.txt | 2 +- - src/third_party/CMakeLists.txt | 20 +++++++++++--------- - src/third_party/minizip/README.txt | 4 ++++ - 6 files changed, 63 insertions(+), 10 deletions(-) + CMakeLists.txt | 1 + + cmake/Modules/FindMinizip.cmake | 37 +++++++++++++++++++++++++++++++++++++ + cmake/WlFunctions.cmake | 8 ++++++++ + src/io/filesystem/CMakeLists.txt | 2 +- + src/io/filesystem/zip_filesystem.h | 6 ++++++ + src/third_party/CMakeLists.txt | 20 +++++++++++--------- + 6 files changed, 64 insertions(+), 10 deletions(-) --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -43,6 +43,7 @@ - endif(POLICY CMP0074) - - include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake") -+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules) - - option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF) - option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF) -@@ -105,6 +106,8 @@ +@@ -142,6 +142,7 @@ + find_package(SDL2_mixer REQUIRED) find_package(SDL2_ttf REQUIRED) find_package(ZLIB REQUIRED) - find_package(ICU REQUIRED) +find_package(Minizip) -+ - if(OPTION_USE_GLBINDING) - find_package(glbinding REQUIRED) + if(${CMAKE_VERSION} VERSION_LESS 3.9.0) + find_package(ICU_old REQUIRED) else() --- /dev/null -+++ b/Modules/FindMinizip.cmake ++++ b/cmake/Modules/FindMinizip.cmake @@ -0,0 +1,37 @@ +# - Try to find Minizip +# Once done this will define @@ -77,10 +65,10 @@ I just added this line to make its use easier: + --- a/cmake/WlFunctions.cmake +++ b/cmake/WlFunctions.cmake -@@ -81,6 +81,14 @@ +@@ -84,6 +84,14 @@ + if(ARG_USES_ZLIB) - wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS}) - target_link_libraries(${NAME} ${ZLIB_LIBRARY}) + target_link_libraries(${NAME} ZLIB::ZLIB) + if (MINIZIP_FOUND) + wl_include_system_directories(${NAME} ${MINIZIP_INCLUDE_DIR}) + target_link_libraries(${NAME} ${MINIZIP_LIBRARY}) @@ -136,7 +124,7 @@ I just added this line to make its use easier: ) --- a/src/io/filesystem/zip_filesystem.h +++ b/src/io/filesystem/zip_filesystem.h -@@ -28,8 +28,14 @@ +@@ -25,8 +25,14 @@ #include "io/filesystem/filesystem.h" #include "io/streamread.h" #include "io/streamwrite.h" -- cgit v1.2.3 From 620669fd17306c2edb21c64a99fa47160fefb319 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 23 Jun 2021 12:52:21 +0200 Subject: gnu: cups: Add replacement to fix CVE-2020-10001. * gnu/packages/patches/cups-CVE-2020-10001.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cups.scm (cups-minimal/fixed): New variable. (cups-minimal)[replacement]: Assign it to new field. --- gnu/local.mk | 1 + gnu/packages/cups.scm | 6 ++++ gnu/packages/patches/cups-CVE-2020-10001.patch | 47 ++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/cups-CVE-2020-10001.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f7ff9af997..fb6c25d6f9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -929,6 +929,7 @@ dist_patch_DATA = \ %D%/packages/patches/crda-optional-gcrypt.patch \ %D%/packages/patches/clucene-contribs-lib.patch \ %D%/packages/patches/cube-nocheck.patch \ + %D%/packages/patches/cups-CVE-2020-10001.patch \ %D%/packages/patches/curl-use-ssl-cert-env.patch \ %D%/packages/patches/curl-7.76-use-ssl-cert-env.patch \ %D%/packages/patches/curl-7.77-tls-priority-string.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 5a15cd51b6..2dab881ae6 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -252,6 +252,7 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.") (package (name "cups-minimal") (version "2.3.3") + (replacement cups-minimal/fixed) (source (origin (method url-fetch) @@ -312,6 +313,11 @@ device-specific programs to convert and print many types of files.") ;; CUPS is Apache 2.0 with exceptions, see the NOTICE file. (license license:asl2.0))) +(define cups-minimal/fixed + (package-with-extra-patches + cups-minimal + (search-patches "cups-CVE-2020-10001.patch"))) + (define-public cups (package/inherit cups-minimal (name "cups") diff --git a/gnu/packages/patches/cups-CVE-2020-10001.patch b/gnu/packages/patches/cups-CVE-2020-10001.patch new file mode 100644 index 0000000000..1b16c7d97c --- /dev/null +++ b/gnu/packages/patches/cups-CVE-2020-10001.patch @@ -0,0 +1,47 @@ +From efbea1742bd30f842fbbfb87a473e5c84f4162f9 Mon Sep 17 00:00:00 2001 +From: Michael R Sweet +Date: Mon, 1 Feb 2021 15:02:32 -0500 +Subject: [PATCH] Fix a buffer (read) overflow in ippReadIO (CVE-2020-10001) + +--- + +diff --git a/cups/ipp.c b/cups/ipp.c +index 3d529346c..adbb26fba 100644 +--- a/cups/ipp.c ++++ b/cups/ipp.c +@@ -2866,7 +2866,8 @@ ippReadIO(void *src, /* I - Data source */ + unsigned char *buffer, /* Data buffer */ + string[IPP_MAX_TEXT], + /* Small string buffer */ +- *bufptr; /* Pointer into buffer */ ++ *bufptr, /* Pointer into buffer */ ++ *bufend; /* End of buffer */ + ipp_attribute_t *attr; /* Current attribute */ + ipp_tag_t tag; /* Current tag */ + ipp_tag_t value_tag; /* Current value tag */ +@@ -3441,6 +3442,7 @@ ippReadIO(void *src, /* I - Data source */ + } + + bufptr = buffer; ++ bufend = buffer + n; + + /* + * text-with-language and name-with-language are composite +@@ -3454,7 +3456,7 @@ ippReadIO(void *src, /* I - Data source */ + + n = (bufptr[0] << 8) | bufptr[1]; + +- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE) || n >= (int)sizeof(string)) ++ if ((bufptr + 2 + n + 2) > bufend || n >= (int)sizeof(string)) + { + _cupsSetError(IPP_STATUS_ERROR_INTERNAL, + _("IPP language length overflows value."), 1); +@@ -3481,7 +3483,7 @@ ippReadIO(void *src, /* I - Data source */ + bufptr += 2 + n; + n = (bufptr[0] << 8) | bufptr[1]; + +- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE)) ++ if ((bufptr + 2 + n) > bufend) + { + _cupsSetError(IPP_STATUS_ERROR_INTERNAL, + _("IPP string length overflows value."), 1); -- cgit v1.2.3