Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#134 dereference of null pointer in plain_arrows.asy arrow()

closed-fixed
nobody
None
5
2011-05-15
2011-04-23
W. Trevor King
No

$ asy --version
Asymptote version 2.08 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]
$ echo 'arrow(b=(0,0), dir=0, length=1cm);' > test.asy
$ asy test.asy
/usr/share/asymptote/plain_arrows.asy: 595.3: dereference of null pointer

The `arrow()` function declares a `Label L=null` argument, but then proceeds to manipulate it without checking for a `null` value first.
I just checked the current SVN code and the problem has not been fixed yet.

As a temporary workaround, you can set `L=""` in your `arrow()` call.

Discussion

  • W. Trevor King
    W. Trevor King
    2011-04-23

    untested patch fixing the problem

     
    Attachments
  • John Bowman
    John Bowman
    2011-05-15

    • status: open --> closed-fixed
     
  • John Bowman
    John Bowman
    2011-05-15

    Thanks; fixed in svn and upcoming release.