Project

General

Profile

Bug #10293

UTFDataFormatException in EDITOR with Long Text

Added by Ionut-Mihai Simioniuc about 1 year ago. Updated about 1 year ago.

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.

long-strings-serialize-patch.diff Magnifier (2.83 KB) Ionut-Mihai Simioniuc, 07/16/2025 03:17 AM

History

#1 Updated by Ionut-Mihai Simioniuc about 1 year ago

Vladimir proposed this fix :

Also available in: Atom PDF