---

** [patches:#578] fix for crash in canvas_initbang() when loading malformed 
patch files**

**Status:** open
**Group:** bugfix
**Labels:** crash 
**Created:** Sat Jun 25, 2016 08:33 PM UTC by Claude Heiland-Allen
**Last Updated:** Sat Jun 25, 2016 08:33 PM UTC
**Owner:** Miller Puckette
**Attachments:**

- 
[0001-fix-canvas_initbang-crash-when-loading-bad-patch-fil.patch](https://sourceforge.net/p/pure-data/patches/578/attachment/0001-fix-canvas_initbang-crash-when-loading-bad-patch-fil.patch)
 (1.6 kB; text/x-patch)


Pd crashes in canvas_initbang() if you load a file that isn't really a patch, 
because binbuf_evalfile() assumes the file is a regular patch that created a 
canvas during evaluation.  The fix is to check that the #X symbol is really 
bound to a canvas before calling canvas_initbang() on its thing.

For an example of the crash:

    echo oops > oops.pd
    pd oops.pd

With the attached patch Pd no longer crashes and instead prints "oops: no such 
object".



---

Sent from sourceforge.net because [email protected] is subscribed to 
https://sourceforge.net/p/pure-data/patches/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/pure-data/admin/patches/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to