public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Johannes Altmanninger via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Johannes Altmanninger <aclopte@gmail.com>
Subject: [pve-devel] [PATCH vncterm 1/4] Remove dead code and buffer-overflow
Date: Sat, 23 Aug 2025 10:17:05 +0200	[thread overview]
Message-ID: <mailman.460.1756280114.385.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20250823083010.145866-1-aclopte@gmail.com>

[-- Attachment #1: Type: message/rfc822, Size: 6811 bytes --]

From: Johannes Altmanninger <aclopte@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: Johannes Altmanninger <aclopte@gmail.com>
Subject: [PATCH vncterm 1/4] Remove dead code and buffer-overflow
Date: Sat, 23 Aug 2025 10:17:05 +0200
Message-ID: <20250823083010.145866-2-aclopte@gmail.com>

Signed-off-by: Johannes Altmanninger <aclopte@gmail.com>
---
 vncterm.c | 13 ++-----------
 vncterm.h |  2 --
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/vncterm.c b/vncterm.c
index 3dd5d4e..fd71092 100644
--- a/vncterm.c
+++ b/vncterm.c
@@ -1276,8 +1276,6 @@ static void vncterm_putchar(vncTerm *vt, unicode ch) {
         case '1':
         case '2':
         case '4':
-            vt->osc_cmd = ch;
-            vt->osc_textbuf[0] = 0;
             vt->tty_state = ESosc1;
             break;
         default:
@@ -1299,16 +1297,9 @@ static void vncterm_putchar(vncTerm *vt, unicode ch) {
         }
         break;
     case ESosc2:
-        if (ch != 0x9c && ch != 7) {
-            int i = 0;
-            while (vt->osc_textbuf[i]) {
-                i++;
-            }
-            vt->osc_textbuf[i++] = ch;
-            vt->osc_textbuf[i] = 0;
-        } else {
+        if (ch == 0x9c || ch != 7) {
 #ifdef DEBUG
-            fprintf(stderr, "OSC:%c:%s\n", vt->osc_cmd, vt->osc_textbuf);
+            fprintf(stderr, "OSC sequence\n");
 #endif
             vt->tty_state = ESnormal;
         }
diff --git a/vncterm.h b/vncterm.h
index 7887d9b..82f9959 100644
--- a/vncterm.h
+++ b/vncterm.h
@@ -58,8 +58,6 @@ typedef struct vncTerm {
     unsigned int esc_count;
     unsigned int esc_ques;
     unsigned int esc_has_par;
-    char osc_textbuf[4096];
-    char osc_cmd;
     unsigned int region_top;
     unsigned int region_bottom;
 
-- 
2.50.1.194.g038143def7



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

       reply	other threads:[~2025-08-27  7:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250823083010.145866-1-aclopte@gmail.com>
2025-08-23  8:17 ` Johannes Altmanninger via pve-devel [this message]
2025-08-23  8:17 ` [pve-devel] [PATCH vncterm 2/4] Remove unused state from OSC parser Johannes Altmanninger via pve-devel
2025-08-23  8:17 ` [pve-devel] [PATCH vncterm 3/4] Parse more OSC sequences Johannes Altmanninger via pve-devel
2025-08-23  8:17 ` [pve-devel] [PATCH vncterm 4/4] Also parse DCS commands Johannes Altmanninger via pve-devel
2025-09-25  6:15 ` [pve-devel] [PATCH vncterm v2 1/3] Remove unused state from OSC parser Johannes Altmanninger via pve-devel
     [not found] ` <20250925061600.11818-1-aclopte@gmail.com>
2025-09-25  6:15   ` [pve-devel] [PATCH vncterm v2 2/3] Parse more OSC sequences Johannes Altmanninger via pve-devel
2025-09-25  6:15   ` [pve-devel] [PATCH vncterm v2 3/3] Also parse DCS commands Johannes Altmanninger via pve-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.460.1756280114.385.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=aclopte@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal