Copied from Debian. From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Wed, 3 Jun 2015 20:26:03 +0200 Subject: [PATCH] Issue #217 - avoid len going negative, ever... --- src/lexer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lexer.c b/src/lexer.c index 376a3d8..664f806 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name, /* and prompts attributes unless --literal-attributes is set to yes */ /* #994841 - Whitespace is removed from value attributes */ - if (munge && + /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */ + if ((len > 0) && munge && TY_(tmbstrcasecmp)(name, "alt") && TY_(tmbstrcasecmp)(name, "title") && TY_(tmbstrcasecmp)(name, "value") && TY_(tmbstrcasecmp)(name, "prompt")) { - while (TY_(IsWhite)(lexer->lexbuf[start+len-1])) + while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0)) --len; - while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len) + while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0)) { ++start; --len; diff
path: root/gnu/packages/mpi.scm
AgeCommit message (Expand)Author
2020-03-31gnu: hwloc@2: Update to 2.2.0....* gnu/packages/mpi.scm (hwloc-2): Update to 2.2.0. Ludovic Courtès
2020-03-31gnu: hwloc@2: Skip test that fails on emulated hardware....Works around <https://bugs.gnu.org/40342>. * gnu/packages/mpi.scm (hwloc-2)[arguments]: Add 'skip-test-that-fails-on-qemu' phase. Ludovic Courtès
2020-03-10gnu: openmpi: Use HTTPS home page....* gnu/packages/mpi.scm (openmpi)[home-page]: Use HTTPS. Tobias Geerinckx-Rice
2020-03-10gnu: openmpi: Update to 4.0.3....* gnu/packages/mpi.scm (openmpi): Update to 4.0.3. Tobias Geerinckx-Rice
2020-02-17gnu: mpi.scm: Use 'license:' prefix....* gnu/packages/mpi.scm: Import (guix licenses) with the 'license:' prefix. Efraim Flashner
2020-02-17gnu: Add MPICH....* gnu/packages/mpi.scm (mpich): New variable. Co-authored-by: Ludovic Courtès <ludovic.courtes@inria.fr> Maurice Brémond