summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@qualcomm.com>2010-09-19 14:53:01 -0700
committerQuIC Gerrit Code Review <code-review@quicinc.com>2010-09-19 14:53:02 -0700
commit563ea67be9855621d5808168e890615cc29f37cd (patch)
treed7d05201b8532f1094f8db0b3358284d045ddb92
parent29c13d43a2a7ab301e02978f7ce66a48c22fed2f (diff)
parent9618674f412a45d294e5941e9442c9496ddc73b1 (diff)
downloadandroid_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-xcnd/src/cnd_iproute2.cpp5
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;
}
};