bf fails to detect unbalanced brackets
Bug #1814553 reported by
Kimiyuki Onaka
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
To post a comment you must log in.
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.]