Bug #10293
UTFDataFormatException in EDITOR with Long Text
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
Description
When an EDITOR contains text longer than 65535 characters, the client crashes with a java.io.UTFDataFormatException.
The exception originates from the ObjectOutputStream code, which enforces a 65535-byte limit strings:
void writeUTF(String s, long utflen) throws IOException {
if (utflen > 0xFFFFL) {
throw new UTFDataFormatException();
}
writeShort((int) utflen);
if (utflen == (long) s.length()) {
writeBytes(s);
} else {
writeUTFBody(s);
}
}
This issue may have broader implications beyond this specific task.
History
#1 Updated by Ionut-Mihai Simioniuc about 1 year ago
- File long-strings-serialize-patch.diff
added
Vladimir proposed this fix :