getchar.c: Fix PVS/V522: Dereference of null pointer mp_match

This commit is contained in:
Justin M. Keyes
2018-05-20 08:41:20 +02:00
parent 8e20b77bd1
commit e24d338194

View File

@@ -1854,6 +1854,7 @@ static int vgetorpeek(int advance)
} }
} else if (keylen > mp_match_len } else if (keylen > mp_match_len
|| (keylen == mp_match_len || (keylen == mp_match_len
&& mp_match != NULL
&& (mp_match->m_mode & LANGMAP) == 0 && (mp_match->m_mode & LANGMAP) == 0
&& (mp->m_mode & LANGMAP) != 0)) { && (mp->m_mode & LANGMAP) != 0)) {
// found a longer match // found a longer match