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; 223031d8f379a91961842ca593a6'>commitdiff
path: root/gnu/packages/stenography.scm
AgeCommit message (Expand)Author
2023-04-30gnu: plover: Fix build....Fixes this error in tests: `pkg_resources.DistributionNotFound: The 'wcwidth' distribution was not found and is required by the application` * gnu/packages/stenography.scm (plover)[inputs]: Add python-wcwidth. Signed-off-by: Ludovic Courtès <ludo@gnu.org> kiasoc5
2023-01-03gnu: dbus: Add dbus to inputs....* gnu/packages/stenography.scm (plover): Add dbus to inputs and LD_LIBRARY_PATH. Plover tries to load dbus during startup (visible with --log-level debug). This will allow it to find it. [inputs]: Add dbus. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Parnikkapore
2023-01-03gnu: plover: Wrap so that icons can be found....* gnu/packages/stenography.scm (plover): Wrap and add qtsvg to QT_PLUGIN_PATH This is needed for the icons in Plover's UI to appear. [inputs]: Add BASH-MINIMAL. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Parnikkapore
2022-10-25gnu: plover: Update to 4.0.0.dev12....* gnu/packages/stenography.scm (plover): Update to 4.0.0.dev12. [arguments]<#:phases>: Add phase to properly run tests, and skip failing one. [native-inputs]: Add PYTHON-BABEL, PYTHON-MOCK, PYTHON-PYTEST-QT, PYTHON,PYTEST-XVFB. [inputs]: Remove PYTHON-PYQT, PYTHON-BABEL. Add PYTHON-PLOVER-STROKE, PYTHON-PYQT, PYTHON-RTF-TOKENIZE, QTSVG-5. (python-plover-stroke): New variable. Nicolas Goaziou