diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index 55067cab6c..88820b6378 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -49,6 +49,8 @@ static int diff_grep(mmfile_t *one, mmfile_t *two, xpparam_t xpp; xdemitconf_t xecfg; + assert(!one || one->ptr[one->size] == '\0'); + assert(!two || two->ptr[two->size] == '\0'); if (!one) return !regexec(regexp, two->ptr, 1, ®match, 0); if (!two)