Skip to content
Snippets Groups Projects
Commit 02aca4a7 authored by Jeff Young's avatar Jeff Young :flag_ua:
Browse files

Don't run off the end of a string.

Fixes #7461
parent a475f457
No related branches found
No related tags found
Loading
Pipeline #253007452 passed
......@@ -169,8 +169,16 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject )
size_t m = n + 1;
wxUniChar str_m = str[m];
while( m < strlen && ( wxIsalnum( str_m ) || str_m == wxT( '_' ) || str_m == wxT( ':' ) ) )
str_m = str[++m];
while( wxIsalnum( str_m ) || str_m == wxT( '_' ) || str_m == wxT( ':' ) )
{
if( ++m == strlen )
{
str_m = 0;
break;
}
str_m = str[m];
}
wxString strVarName( str.c_str() + n + 1, m - n - 1 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment