bf fails to detect unbalanced brackets

Bug #1814553 reported by Kimiyuki Onaka
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bf (Ubuntu)
New
Undecided
Unassigned

Bug Description

bf has the feature to detect unbalanced brackets.
However, this fails to detect some types of unbalanced brackets.

For example, all of

    $ bf <(echo '[')
    $ bf <(echo '+[')
    $ bf <(echo '[[]')
    $ bf <(echo ']')
    $ bf <(echo '[]]')

should say

    Error: Unbalanced brackets.
    an error occured

but they say nothing or

    malloc(): memory corruption
    Aborted (core dumped)

This is caused by a kind of off-by-one bug and a lack of checking.

Also, I wrote a patch for this bug and attached.

Package: bf
Version: 20041219ubuntu6

Tags: patch
Revision history for this message
Kimiyuki Onaka (kimiyuki) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bf.c.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.