call prop_type_add('Xtp', {})
call prop_add(2, 1, {'type': 'Xtp', 'length': 1})
- " this caused OOB read, now it triggers internal error
- call assert_fails('call prop_list(1)', ['E340:', 'corrupted'])
+ " this caused OOB read, now it is rejected as a corrupted (untrusted) undo
+ " file with a catchable error instead of an internal error
+ call assert_fails('call prop_list(1)', 'E967:')
call prop_type_delete('Xtp')
bwipe!
// New format: [prop_count (uint16)][textprop_T...][vtext...]
if (propdata_len < PROP_COUNT_SIZE + sizeof(textprop_T))
{
- iemsg(e_text_property_info_corrupted);
+ emsg(e_text_property_info_corrupted);
um->buf = NULL;
return false;
}
mch_memmove(&prop_count, count_ptr, PROP_COUNT_SIZE);
if (!text_prop_count_valid(prop_count, propdata_len))
{
- iemsg(e_text_property_info_corrupted);
+ emsg(e_text_property_info_corrupted);
um->buf = NULL;
return false;
}
// prop_count is never zero.
if (propdata_len < PROP_COUNT_SIZE + sizeof(textprop_T))
{
- iemsg(e_text_property_info_corrupted);
+ emsg(e_text_property_info_corrupted);
return 0;
}
mch_memmove(&prop_count, text + textlen, PROP_COUNT_SIZE);
if (!text_prop_count_valid(prop_count, propdata_len))
{
- iemsg(e_text_property_info_corrupted);
+ emsg(e_text_property_info_corrupted);
return 0;
}
*props = text + textlen + PROP_COUNT_SIZE;