Public bug reported:

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

** Affects: bf (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "bf.c.patch"
   https://bugs.launchpad.net/bugs/1814553/+attachment/5235852/+files/bf.c.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1814553

Title:
  bf fails to detect unbalanced brackets

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bf/+bug/1814553/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to