You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an OSCMethod attempts to match an OSC Address containing an incorrectly formatted square bracketed wildcard, OSCKit crashes. Specifically, the formatting needs to include whitespace to create this crash. For example:
Thread 1: Fatal error: String index is out of bounds
It would be great if the match could fail silently, rather than throw an exception. I guess you could perform a check for invalid characters on the way in? Or break the While loop before the index is out of bounds...
If an OSCMethod attempts to match an OSC Address containing an incorrectly formatted square bracketed wildcard, OSCKit crashes. Specifically, the formatting needs to include whitespace to create this crash. For example:
/this/example/[0- 1]/would/crash/OSCKit
/this/example/[0-1]/would/not
The crash occurs within OSCMatch, function:
func matchSquareBracket(pattern: String,
patternCharacterOffset: inout String.Index,
address: String,
addressCharacterOffset: inout String.Index) -> Bool
Thread 1: Fatal error: String index is out of bounds
It would be great if the match could fail silently, rather than throw an exception. I guess you could perform a check for invalid characters on the way in? Or break the While loop before the index is out of bounds...
I'm on the Issue sammysmallman/OSCKit#23 branch, if that makes any difference.
Thanks again for all your work on OSCKit, I especially love the easy pattern matching, when it's not crashing!
The text was updated successfully, but these errors were encountered: