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
There are other similar methods (-initWithXMLFile:, -initWithXMLFile:fileExtension:, etc.).
Unfortunately, if an error does occur, then the error handling code will try to dereference that nil pointer, and the app crashes. Some error-handling code does check for a null pointer before dereferencing it, but some does not.
Callers can work around this issue by calling the variant of the method that requires an error pointer. However, as-is these methods can easily lead to a crash, so I propose one of these actions be taken:
Remove the methods that don't require an error parameter. Require callers to pass an error parameter.
Change the methods that pass nil pointers such that they instead use a local error variable.
Change the error-handling code so that it always checks for a null error before trying to dereference it.
The text was updated successfully, but these errors were encountered:
TBXML provides this method, which simply invokes another method with a
nil
error pointer:There are other similar methods (
-initWithXMLFile:
,-initWithXMLFile:fileExtension:
, etc.).Unfortunately, if an error does occur, then the error handling code will try to dereference that nil pointer, and the app crashes. Some error-handling code does check for a null pointer before dereferencing it, but some does not.
Callers can work around this issue by calling the variant of the method that requires an error pointer. However, as-is these methods can easily lead to a crash, so I propose one of these actions be taken:
error
parameter. Require callers to pass an error parameter.error
variable.error
before trying to dereference it.The text was updated successfully, but these errors were encountered: