GNU bug report logs - #6149
24.0.50; shell buffer overflow when input longer than 4096 bytes

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Mon, 10 May 2010 04:17:01 UTC

Severity: normal

Tags: confirmed

Merged with 12440, 24531

Found in versions 24.0.50, 24.2

Full log


Message #45 received at 6149 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 24531 <at> debbugs.gnu.org, sbaugh <at> janestreet.com, 6149 <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca, jidanni <at> jidanni.org
Subject: Re: bug#6149: bug#24531: process-send-string seems to truncate lines
 over 4096 characters
Date: Thu, 27 Jul 2023 08:41:52 +0300
> Date: Thu, 27 Jul 2023 04:48:18 +0300
> Cc: 24531 <at> debbugs.gnu.org, 6149 <at> debbugs.gnu.org,
>  Stefan Monnier <monnier <at> iro.umontreal.ca>, jidanni <at> jidanni.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> If some syscall or etc limits the length of a string to 4096, can't we 
> detect this case, split the string and emit said call multiple times?
> 
> This function's docstring already mentions the case of
> 
>    If STRING is larger than the input buffer of the process, ...
>    it is sent in several bunches

AFAIU, that is based on the errno value returned by a 'write' call
which attempts to write too many bytes (see the would_block function).
I guess writes to PTYs don't do that?

Paul, do you know anything about that?




This bug report was last modified 1 year and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.