Patches item #3505262, was opened at 2012-03-15 07:33 Message generated for change (Comment added) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3505262...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Miller Puckette (millerpuckette) Summary: slightly increase buffers when dealing with UTF8
Initial Comment: running Pd through valgrind [1] gives a number of "Invalid read" errors, as soon as you create an object and type a single letter (e.g. "f"). creating the object (by licking besides it), gives another number of "Invalid read" errors.
those errors suggest that memory outside the allocated buffer is accessed. it seems that all these errors are related to the UTF-8 code (since with utf-8 we might have to check multiple bytes).
the attached fix simply increases the allocated buffer slightly (more than what happens already), so the read can take place on safe grounds.
[1] like with $ valgrind --tool=memcheck --leak-check=full ./src/pd -noprefs -nrt -noaudio -stderr
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2012-03-15 07:47
Message: seems like it is duplicate patches day for me: https://sourceforge.net/tracker/?func=detail&aid=3420484&group_id=55...
i haven't really checked the other patch, but it seems like it addresses the same issues while curing the cause rather than the symptoms.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3505262...