[gnome-terminal] app: Limit the number of clipboard targets to a sensible number
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] app: Limit the number of clipboard targets to a sensible number
- Date: Thu, 4 Feb 2021 17:48:29 +0000 (UTC)
commit 4085fd5b87ebdc8fac4ebfa2ca926e47bf3f48ad
Author: Christian Persch <chpe src gnome org>
Date: Thu Feb 4 18:48:15 2021 +0100
app: Limit the number of clipboard targets to a sensible number
src/terminal-app.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 6a4fe03f..ff91e156 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -640,7 +640,7 @@ update_clipboard_targets (TerminalApp *app,
free_clipboard_targets (app);
/* Sometimes we receive targets == NULL but n_targets == -1 */
- if (targets != NULL) {
+ if (targets != NULL && n_targets < 255) {
app->clipboard_targets = g_memdup (targets, sizeof (targets[0]) * n_targets);
app->n_clipboard_targets = n_targets;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]