OSDN Git Service

Fix potential ArrayIndexOutOfBoundsException.
authorjsh <jsh@google.com>
Fri, 18 Sep 2009 22:22:48 +0000 (15:22 -0700)
committerjsh <jsh@google.com>
Fri, 18 Sep 2009 22:31:10 +0000 (15:31 -0700)
commit001d0abd3e523dce5c8a4c14e22bd1ea79976f03
treec64184a32a1aadde19401eeb2525313978a95e46
parentb18b0956afbe0730ced1c5b95c0071dba447765e
Fix potential ArrayIndexOutOfBoundsException.

When parsing an SMS message as email, extractEmailAddressFromMessageBody()
checks parts.length >= 1, but then proceeds to access parts[1] (which
may not exist).  Instead, check for parts.length >= 2, and treat
parts.length = 1 as non-email.

b/2122698
telephony/java/com/android/internal/telephony/SmsMessageBase.java