aboutsummaryrefslogtreecommitdiff
From feeee4b5832b17641e505b7083e0d299fdae318e Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@gnome.org>
Date: Sat, 19 May 2012 17:36:09 +0000
Subject: emulation: Limit integer arguments to 65535

To guard against malicious sequences containing excessively big numbers,
limit all parsed numbers to 16 bit range. Doing this here in the parsing
routine is a catch-all guard; this doesn't preclude enforcing
more stringent limits in the handlers themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=676090
---
diff --git a/src/table.c b/src/table.c
index 140e8c8..85cf631 100644
--- a/src/table.c
+++ b/src/table.c
@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array,
 		if (G_UNLIKELY (*array == NULL)) {
 			*array = g_value_array_new(1);
 		}
-		g_value_set_long(&value, total);
+		g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT));
 		g_value_array_append(*array, &value);
 	} while (i++ < arginfo->length);
 	g_value_unset(&value);
diff --git a/src/vteseq.c b/src/vteseq.c
index 457c06a..46def5b 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal,
                               GValueArray *params,
                               VteTerminalSequenceHandler handler)
 {
-        vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
+        vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT);
 }
 
 static void
--
cgit v0.9.0.2
4. (ublock-prod-assets): Update to 17d534c817bd543bbb5be48113edefcec43bbcc9. Change-Id: Ic955ada31e33f0cf0ab3ad272e6b7c2128d76aac Clément Lassieur 2024-03-30gnu: ublock-origin: Update to 1.57.0....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.57.0. (ublock-main-assets): Update to 13715d6deb2ab7e384ac79368fd53c9fd8a7ef64. (ublock-prod-assets): Update to 3da96ce3dd494202656cbc95e1de8baabc0ab7b2. Change-Id: Id821ec01d3fde27feadf2a95173e6a26b669aacc Clément Lassieur 2024-02-21gnu: ublock-origin: Update to 1.56.0....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.56.0. (ublock-main-assets): Update to b15998fae22b2b9593794b6b46647385b9c101d4. (ublock-prod-assets): Update to 60fa7b4b33d5d257d9d0f1ee8db65c1e663f2d31. Change-Id: I46c7241328f36b19756263b84c95a57145c72a40 Clément Lassieur 2024-02-03gnu: ublock-origin: Update to 1.55.0....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.55.0. (ublock-main-assets): Update to 0cb71ec86524082c463d2fd2e18ecdea04fe335c. (ublock-prod-assets): Update to 21c07155353d7ecca2ffdc9e786f252a8cf00935. Change-Id: I1a1235e2ba14166e4ec8b50c353e90f87e81559b Clément Lassieur 2023-12-27gnu: passff: Update to 1.16....* gnu/packages/browser-extensions.scm (passff): Update to 1.16. Change-Id: If1db92641ee0919ff9d6bf02db2efbc2863cf395 Clément Lassieur 2023-12-27gnu: passff-host: Update to 1.2.4....* gnu/packages/browser-extensions.scm (passff-host): Update to 1.2.4. Change-Id: I66f7d9bc0026723169b4509f1a99188dd3b7fb44 Clément Lassieur 2023-12-27gnu: Add torbrowser....* gnu/packages/tor.scm (torbrowser): New variable. (torbrowser-assets): New variable. * gnu/packages/browser-extensions.scm (noscript): New variable. (noscript/icecat): New variable. Co-authored-by: André Batista <nandre@riseup.net> Change-Id: I73dc53905e4a028108bb34aae07e44256cf16c85 Clément Lassieur 2023-12-18gnu: ublock-origin: Update to 1.54.0....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.54.0. (ublock-main-assets): Update to 76bd7cb53036a36f7e7df5ee9173f588ba8aa966. (ublock-prod-assets): Update to a379a168fc149ffbd6d10cd0700d4ab4801e57f2. Change-Id: I0296b45b684562afaef859b0144c875ff05cd2d8 Clément Lassieur 2023-12-10gnu: Add KeePassXC-Browser....* gnu/packages/browser-extensions.scm (keepassxc-browser) (keepassxc-browser-icecat): New variable. Change-Id: I6f85228e4e012f3e5f8c913fda38287255573604 Ludovic Courtès 2023-11-10gnu: ublock-origin: Update to 1.53.2....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.53.2. (ublock-main-assets): Update to d93605b8584df8cd47bcc91b3d932feecd9e3a2a. (ublock-prod-assets): Update to 1d3df32ef6672763f44b27a95fd5cb3b5770d5e2. Change-Id: Ifd853835137ad7be5a0322d6a8e438f23e7ecb09 Clément Lassieur 2023-11-06gnu: ublock-origin: Update to 1.53.0....* gnu/packages/browser-extensions.scm (ublock-origin): Update to 1.53.0. (ublock-main-assets): Update to d573d4db0bccb3f99fa8845c2b1dcb79103007d3. (ublock-prod-assets): Update to c7cfd8fb7e4ea07051f55f370d504c78e6a8e023. Change-Id: I1c9ac9e130bb8146904229f951de9b42d5c84479 Clément Lassieur 2023-11-04gnu: passff-host: Add explicit references to inputs and remove some....This removes ‘coreutils’, ‘grep’, ‘sed’, ‘which’, ‘bash-minimal’ and ‘gnu-make’ inputs, which were only used by the Makefile and install_host_app.sh. Instead of running install_host_app.sh (through ‘make’) which does a few text substitutions, do the text substitutions with Scheme code. This simplifies things and avoids unnecessary native inputs. * gnu/packages/browser-extensions.scm (passff-host)[build-system]: Change to copy-build-system. [arguments]: Copy passff.json and passff.py. Do text substitutions on them rather than running make. Refer to ‘password-store’ and ‘python’ through inputs rather than directly. [inputs]: Add PASSWORD-STORE and PYTHON. Change-Id: I8fdb757516a7c30eae36b15f2a8d91e1445b19a5 Clément Lassieur 2023-10-29gnu: passff-host: Fix builder issues....* gnu/packages/browser-extensions.scm (passff-host)[arguments]: Use `patch-shebang` instead of wrong `substitute*`, add newline after substitution. Change-Id: I6cd1d681e9e84bdeb24943dfe1d85d996f1a262b Clément Lassieur 2023-10-28gnu: passff-host: Refactor builder....* gnu/packages/browser-extensions.scm (passff-host)[arguments]: Refactor builder. Change-Id: I42cb5e6b4808a8b2025d20654c57392f79c01a5c Clément Lassieur 2023-10-25gnu: Add passff....* gnu/packages/browser-extensions.scm (passff-host): New variable. (passff): New variable. Change-Id: I0f6f4b0c319e5cffd0940421a4d8bdc73d8d806b Clément Lassieur 2023-10-23gnu: icecat: Support Guix packaged extensions and native manifests....* gnu/build/icecat-extension.scm: New file with a MAKE-ICECAT-EXTENSION procedure that makes sure the add-on directory is a symlink, so that Icecat can normalize it into a package store path. * gnu/local.mk (dist_patch_DATA): Register it, as well as new patches. * gnu/packages/browser-extensions.scm (ublock-origin)[properties]: Store the add-on ID so that it is accessible in MAKE-ICECAT-EXTENSION. [arguments]: Use the add-on ID as root directory. (ublock-origin/icecat): New procedure. * gnu/packages/gnuzilla.scm (icecat-minimal)[arguments]: Rewrite the unused 'apply-guix-specific-patches' phase so that it applies the following two patches. [native-search-paths]: New field. * gnu/packages/patches/icecat-compare-paths.patch: New patch that compares add-on paths (which are package store paths) to detect package changes. * gnu/packages/patches/icecat-use-system-wide-dir.patch: New patch that replaces "/usr/lib/mozilla" (the system-wide directory for extensions and native manifests) with "$ICECAT_SYSTEM_DIR". Clément Lassieur 2023-09-28gnu: ublock-origin: Update to 1.51.0....* gnu/packages/browser-extensions.scm (ublock-main-assets): Add origin. (ublock-prod-assets): Add origin. (ublock-origin): Update to 1.51.0. [source]: Dropped (recursive? #t). [arguments]: Rewrite phase do-not-depend-on-git. Use gexp. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Nicolas Graves