Skip to content
Snippets Groups Projects
  • Xiaojun Bi's avatar
    11b70761
    Fix a bug for counting code points in WordComposer.java · 11b70761
    Xiaojun Bi authored
    This bug threw an ArrayIndexOutOfBoundsException when the word length
    is 49 (maxSize + 1) when calling StringUtils.copyCodePointsAndReturnCodePointCount(...)
    in the same function. This bug is discovered by running SKETCH.
    
    The intent is to count the code points from index 0 to index i (included).
    The original code only counted the code points from index 0 to index (i-1).
    
    Bug: 13969542
    Change-Id: Idbf596aba2379ba552dbe580c83c42044d505aaf
    11b70761
    History
    Fix a bug for counting code points in WordComposer.java
    Xiaojun Bi authored
    This bug threw an ArrayIndexOutOfBoundsException when the word length
    is 49 (maxSize + 1) when calling StringUtils.copyCodePointsAndReturnCodePointCount(...)
    in the same function. This bug is discovered by running SKETCH.
    
    The intent is to count the code points from index 0 to index i (included).
    The original code only counted the code points from index 0 to index (i-1).
    
    Bug: 13969542
    Change-Id: Idbf596aba2379ba552dbe580c83c42044d505aaf
WordComposer.java 18.77 KiB