abstracthandler_callback safety in g_editor.c
A few things:
- after the return of
sys_relativizepath
,label
needs to be checked to ensure it hasn't been truncated or whatever the hecksys_relativizepath
does that requires MAXPDSTRING*4 sized buffer. - if I understand this callback correctly, it is taking a
[pd arg]
symbol argument, which is at most MAXPDSTRING characters, and using it for an abstraction filename, which can be at most something like 256 characters (assuming we want abstractions created with this feature to be cross-platform compatible).
So, somewhere in this feature we need a warning or error printed if a long [pd]
arg exceeds (let's say, to be safe) 255 characters.
Since the algorithm can prepend an absolute path in some cases, such a warning/error is possible in practice.