Skip to content
  • Xing Zhang's avatar
    38ed24ee
    Bug #12635103: VALGRIND WARNINGS IN MY_WILDCMP_MB AND MY_WILDCMP_8BIT WITH · 38ed24ee
    Xing Zhang authored
                   LIKE AND CONVERT
    
    Valgrind complains uninitialized value in my_wildcmp_mb_impl() and
    my_wildcmmy_wildcmp_8bit_impl(). This is because pointer steps to byte
    beyond string length. And this pointer is actually not necessary to get
    comparison result.
    
    Fix:
    Change the my_wildcmp_XX's loop condition to avoid reading uninitialized
    memory.
    
    wild_compare_full() only works for null-terminated string. Also change it
    to be safe for tight bound string.
    
    Change-Id: Ie8920c8a3287f79297fae3aeeabd48c537da6bdf
    38ed24ee
    Bug #12635103: VALGRIND WARNINGS IN MY_WILDCMP_MB AND MY_WILDCMP_8BIT WITH
    Xing Zhang authored
                   LIKE AND CONVERT
    
    Valgrind complains uninitialized value in my_wildcmp_mb_impl() and
    my_wildcmmy_wildcmp_8bit_impl(). This is because pointer steps to byte
    beyond string length. And this pointer is actually not necessary to get
    comparison result.
    
    Fix:
    Change the my_wildcmp_XX's loop condition to avoid reading uninitialized
    memory.
    
    wild_compare_full() only works for null-terminated string. Also change it
    to be safe for tight bound string.
    
    Change-Id: Ie8920c8a3287f79297fae3aeeabd48c537da6bdf
Loading