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; ef='/guix/diff/gnu/machine/ssh.scm?id=2ae1c7528d19c61a10f6e3ddfee831ad3fd34e20'>diff
path: root/gnu/machine/ssh.scm
AgeCommit message (Expand)Author
2019-08-17machine: ssh: Fix sanity checks....宋文武
2019-08-16machine: Use 'become-command'....Jakob L. Kreuze
2019-08-15machine: Automatically authorize the coordinator's signing key....Jakob L. Kreuze
2019-08-15machine: Implement 'roll-back-machine'....Jakob L. Kreuze
2019-08-15machine: Allow non-root users to deploy....Jakob L. Kreuze
2019-08-14remote: Build derivations appropriate for the remote's...Jakob L. Kreuze
2019-08-07machine: Add 'build-locally?' field for managed hosts....Jakob L. Kreuze
2019-08-06machine: Implement safety checks....Jakob L. Kreuze
2019-08-06machine: Rename 'system' field....Jakob L. Kreuze
2019-07-26guix system: Add 'reconfigure' module....Jakob L. Kreuze
2019-07-18machine: Fix typo....Tobias Geerinckx-Rice
2019-07-06gnu: Add machine type for deployment specifications....Jakob L. Kreuze