Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#272 Joe crashes at end of line that starts *x or -x

v3.8
closed-duplicate
nobody
5
2014-11-14
2009-02-09
Luke Plant
No

Steps:

1) Start joe
2) Type *x or -x (where x is any alphanumeric character)
3) Continue typing until the word wrap limit (e.g. just type xxxxx xxxxxx xxxxxx ...)

Result:
Joe crashes with
*** JOE was aborted by UNIX signal 6. Buffers saved in DEADJOE

Always reproducible. It will also crash if there are any number of spaces before the initial * or -

Using Joe 3.7, Ubuntu Jaunty packages.

Discussion

  • Philipp Thomas
    Philipp Thomas
    2009-10-22

    This is fixed by this patch:
    --- uformat.c.orig 2009-10-22 17:55:13.000000000 +0200
    +++ uformat.c 2009-10-22 18:32:40.674592919 +0200
    @@ -564,10 +564,12 @@ int uformat(BW *bw)
    if (!bw->o.autoindent) {
    /* Don't indent second line of single-line paragraphs if autoindent is off */
    int x = zlen(indents);
    + int start = x;
    while (x && (indents[x - 1] == ' ' || indents[x - 1] == '\t'))
    indents[--x] = 0;
    if (x) {
    - indents[x++] = ' ';
    + if(x < start)
    + indents[x++] = ' ';
    indents[x] = 0;
    }
    indent = txtwidth1(bw->o.charmap, bw->o.tab, indents, x);

     
  • John J. Jordan
    John J. Jordan
    2014-11-14

    Duplicate of #269.

     
  • John J. Jordan
    John J. Jordan
    2014-11-14

    • status: open --> closed-duplicate
    • Group: --> v3.8