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; f1a9b8cc794c7d32336f23a99b58c05be5a5'>diff
path: root/nix/local.mk
AgeCommit message (Expand)Author
2023-09-24Revert "build: Add missing guix-gc.timer file to binary tarball."...Tobias Geerinckx-Rice
2023-08-31build: Add missing guix-gc.timer file to binary tarball....Maxim Cournoyer
2021-10-01build: Don’t delete ‘guix-gc.timer’ file....Xinglu Chen
2021-09-20etc: Add systemd files for running ‘guix gc’ periodically...Thiago Jung Bauermann
2021-03-30gnu: guix: Fix openrc init scripts....zimoun
2020-10-27maint: Add 'etc/gnu-store.mount.in' to the distribution....Ludovic Courtès
2020-09-17guix-install.sh: Support OpenRC....Morgan Smith
2020-06-27daemon: Remove OpenSSL hash compatibility wrappers....Ludovic Courtès
2020-05-23build: Add a comment above the sysvinit section....Vincent Legoll
2020-05-17etc: Install mount unit only if it exists....Tobias Geerinckx-Rice
2020-05-16etc: Add a systemd unit to bind-mount @storedir@ read-only....Tobias Geerinckx-Rice
2020-03-11Add system start-up files for guix-daemon....Danny Milosavljevic
2019-09-08daemon: Remove 'NIX_LIBEXEC_DIR'....Ludovic Courtès
2019-09-08daemon: Run 'guix substitute' directly and assume a single substituter....Ludovic Courtès
2019-09-08daemon: Run 'guix offload' directly....Ludovic Courtès
2019-09-08daemon: Run 'guix perform-download' directly....Ludovic Courtès
2019-09-08daemon: Run 'guix authenticate' directly....Ludovic Courtès
2019-09-08daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'....Ludovic Courtès