comparison src/ex_docmd.c @ 6987:1661dd8df592 v7.4.811

patch 7.4.811 Problem: Invalid memory access when using "exe 'sc'". Solution: Avoid going over the end of the string. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 04 Aug 2015 22:02:51 +0200
parents 86d43639de31
children 5ea5bd9c18d2
comparison
equal deleted inserted replaced
6986:bf56568ed667 6987:1661dd8df592
3127 { 3127 {
3128 eap->cmdidx = CMD_k; 3128 eap->cmdidx = CMD_k;
3129 ++p; 3129 ++p;
3130 } 3130 }
3131 else if (p[0] == 's' 3131 else if (p[0] == 's'
3132 && ((p[1] == 'c' && p[2] != 's' && p[2] != 'r' 3132 && ((p[1] == 'c' && (p[2] == NUL || (p[2] != 's' && p[2] != 'r'
3133 && p[3] != 'i' && p[4] != 'p') 3133 && (p[3] == NUL || (p[3] != 'i' && p[4] != 'p')))))
3134 || p[1] == 'g' 3134 || p[1] == 'g'
3135 || (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g') 3135 || (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g')
3136 || p[1] == 'I' 3136 || p[1] == 'I'
3137 || (p[1] == 'r' && p[2] != 'e'))) 3137 || (p[1] == 'r' && p[2] != 'e')))
3138 { 3138 {