Re: Limit maximum line length in interactive shells
Björn Gustavsson <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <CA+yh78SriUmk0dF7S_ibQwWw01-5vRSEjc3mdQejLbF3ZpPjGA@mail.gmail.com> |
First, I'll quote a paragraph from https://github.com/erlang/otp/wiki/Submitting-patches: "If you submit a patch in a way other than what is described here, it implies more work for the Erlang/OTP team. In that case we cannot guarantee anything. It is up to the maintainer for that part of OTP to decide whether (s)he will pick up the patch." The patch also does not include a test case for the new functionality and has some code issues (e.g. "%" comments when the convention is to use "%%" comments). Therefore additional work is needed before it is ready for inclusion. Moving on to the problem that the patch addresses, the use case is not clear to us. If a user has access to an Erlang shell, there are many other ways in which (s)he could bring down the system. Therefore, it is not clear that you would gain very much by fixing this particular issue. For these reasons, we reject the patch. /Bjorn On Tue, May 7, 2013 at 4:22 PM, Stefan Zegenhagen < [email protected]> wrote: > Dear all, > > > it seems as if I sent around the wrong version of the patch. Please find > the correct version attached to this e-mail. > > Kind regards, > > > > one of our testers found out that he could reliably reboot our > > erlang-based device by just sending tons of 'A' characters to an > > interactive shell. > > > > It appears that the I/O server of the interactive shell (in group.erl) > > is always reading a full line before doing any end-of-input processing, > > so that by sending bytes without a newline in between, it slowly eats up > > all available memory. > > > > The patch attached to this e-mail fixes that by introducing a new > > io:setopt() option in group.erl named 'max_length' that is used to check > > whether the current line length exceeds this maximum whenever the line > > is edited. If an overlong line is detected, max_length bytes are > > returned immediately (without the actual stop condition being fulfilled, > > though, allowing I/O clients to detect this situation). > > > > max_length is allowed to be an integer() > 0 or 'unlimited'. The default > > is 'unlimited' to have the old behaviour by default. > > > > > > > > Kind regards, > > > > _______________________________________________ > > erlang-patches mailing list > > [email protected] > > http://erlang.org/mailman/listinfo/erlang-patches > > -- > Dr. Stefan Zegenhagen > > arcutronix GmbH > Garbsener Landstr. 10 > 30419 Hannover > Germany > > Tel: +49 511 277-2734 > Fax: +49 511 277-2709 > Email: [email protected] > Web: www.arcutronix.com > > *Synchronize the Ethernet* > > General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - > Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht > Hannover; Ust-Id: DE257551767. > > Please consider the environment before printing this message. > > _______________________________________________ > erlang-patches mailing list > [email protected] > http://erlang.org/mailman/listinfo/erlang-patches > > -- Björn Gustavsson, Erlang/OTP, Ericsson AB _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches