(fix) avoid incorrect truncation leading to exception (fixes #4806)

This commit is contained in:
Ludovic Marcotte authored and leecher1337 committed 2022-11-04 23:50:30 +01:00
1 parent bd6bdcb136
commit 6d27fdd340
2 files changed
+12

No files matched your search

+11
View File
@@ -729,6 +729,17 @@ struct GlobalObjectId {
break;
}
// If we didn't find a "space" character search again for &# to avoid
// truncating the content in the middle of a XML entity
if (i < 0)
{
for (i = len-2 ; i >= 0; i--)
{
if ([theContent characterAtIndex: i] == '&' && [theContent characterAtIndex: i+1] == '#')
break;
}
}
return [theContent substringToIndex: i];
}
+1
View File
@@ -3,6 +3,7 @@
Bug fixes
- [eas] improve FolderSync operation (#4672)
- [eas] avoid incorrect truncation leading to exception (#4806)
4.0.5 (2018-MM-DD)
------------------