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
I've encountered an issue with the substring() function in the antchfx/xpath package. According to the XPath specification, if the length parameter exceeds the actual remaining length of the string, the function should return the substring from the specified start position to the end of the string, rather than causing an error.
Additional Information:
It seems that the current implementation does not perform adequate bounds checking when slicing the string, resulting in a panic when the length parameter is too large.
A potential fix would be to check the bounds and adjust the length to return the substring from the start position to the end of the string if the requested length exceeds the available characters.