Check that the string is long enough before accessing its first and second
characters to fix a crash when an empty or one-character string was passed to
wxFileSystem::URLToFileName().
Closes #13920.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70505
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// file urls either start with a forward slash (local harddisk),
// otherwise they have a servername/sharename notation,
// which only exists on msw and corresponds to a unc
- if ( path[0u] == wxT('/') && path [1u] != wxT('/'))
+ if ( path.length() > 1 && (path[0u] == wxT('/') && path [1u] != wxT('/')) )
{
path = path.Mid(1);
}