diff options
author | Linux Build Service Account <lnxbuild@qualcomm.com> | 2010-09-19 14:53:01 -0700 |
---|---|---|
committer | QuIC Gerrit Code Review <code-review@quicinc.com> | 2010-09-19 14:53:02 -0700 |
commit | 563ea67be9855621d5808168e890615cc29f37cd (patch) | |
tree | d7d05201b8532f1094f8db0b3358284d045ddb92 | |
parent | 29c13d43a2a7ab301e02978f7ce66a48c22fed2f (diff) | |
parent | 9618674f412a45d294e5941e9442c9496ddc73b1 (diff) | |
download | android_external_connectivity-563ea67be9855621d5808168e890615cc29f37cd.tar.gz android_external_connectivity-563ea67be9855621d5808168e890615cc29f37cd.tar.bz2 android_external_connectivity-563ea67be9855621d5808168e890615cc29f37cd.zip |
Merge "external/connectivity: Check for null string before strcmp" into froyo
-rwxr-xr-x | cnd/src/cnd_iproute2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cnd/src/cnd_iproute2.cpp b/cnd/src/cnd_iproute2.cpp index 590bcdb..5fa750a 100755 --- a/cnd/src/cnd_iproute2.cpp +++ b/cnd/src/cnd_iproute2.cpp @@ -81,7 +81,10 @@ enum Cmd_line_actions struct routingTableMapComparator { bool operator() (const uint8_t *string1, const uint8_t *string2) const { - return (strcmp((char *)string1, (char *)string2) < 0); + if (string1 && string2) { + return (strcmp((char *)string1, (char *)string2) < 0); + } + return false; } }; |