Problem: Illegal memory access with "t".
Solution: Use strncmp() instead of memcmp(). (Dominique Pelle, closes #1528)
if (p[col] == c && stop)
break;
}
- else
- {
- if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0
+ else if (STRNCMP(p + col, lastc_bytes, lastc_bytelen) == 0
&& stop)
- break;
- }
+ break;
stop = TRUE;
}
}
q!
endfunc
+func Test_searchc()
+ " These commands used to cause memory overflow in searchc().
+ new
+ norm ixx
+ exe "norm 0t\u93cf"
+ bw!
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 398,
/**/
397,
/**/