ASF Bugzilla – Attachment 30253 Details for
Bug 54925
[PATCH] StyleTextPropAtom incorrect text size causes StringIndexOutOfBoundsException in RichTextRun.getText()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that truncates text size if it's larger than the parent
StyleTextPropAtom.patch (text/plain), 886 bytes, created by
virtuald
on 2013-05-03 20:35:37 UTC
(
hide
)
Description:
Patch that truncates text size if it's larger than the parent
Filename:
MIME Type:
Creator:
virtuald
Created:
2013-05-03 20:35:37 UTC
Size:
886 bytes
patch
obsolete
>Index: StyleTextPropAtom.java >=================================================================== >--- StyleTextPropAtom.java (revision 1477896) >+++ StyleTextPropAtom.java (working copy) >@@ -274,6 +274,8 @@ > while(pos < rawContents.length && textHandled < prsize) { > // First up, fetch the number of characters this applies to > int textLen = LittleEndian.getInt(rawContents,pos); >+ if (textHandled + textLen > (size+1)) >+ textLen = (size+1) - textHandled; > textHandled += textLen; > pos += 4; > >@@ -309,6 +311,8 @@ > while(pos < rawContents.length && textHandled < chsize) { > // First up, fetch the number of characters this applies to > int textLen = LittleEndian.getInt(rawContents,pos); >+ if (textHandled + textLen > (size+1)) >+ textLen = (size+1) - textHandled; > textHandled += textLen; > pos += 4; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54925
: 30253