Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-123

medium length strings could be 65536 bytes long

XMLWordPrintable

      see
      https://github.com/jboss-remoting/jboss-marshalling/blob/master/river/src/main/java/org/jboss/marshalling/river/RiverMarshaller.java

                          if (len == 0) {
                              write(ID_STRING_EMPTY);
                              // don't cache empty strings
                              return;
                          } else if (len <= 256) {
                              write(ID_STRING_SMALL);
                              write(len);
                          } else if (len <= 65336) {
                              write(ID_STRING_MEDIUM);
                              writeShort(len);
                          } else {
                              write(ID_STRING_LARGE);
                              writeInt(len);
      

      the constant for limit 65336 is probably mistaken for 65536 (2^16)

              dlloyd@redhat.com David Lloyd
              mlinhard Michal Linhard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: