summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-08 06:58:52 -0700
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-08-10 20:59:53 +0200
commit7eadc8ef7eae1412bc5a4d9df969ba4a7f64db9f (patch)
tree70402fed4568c0e8218e4f17b6c3fbc8eef18fc7
parentf3acb0ca0242b8f5345dfb04f537c4323486795d (diff)
downloadsubsurface-7eadc8ef7eae1412bc5a4d9df969ba4a7f64db9f.tar.gz
Android: fix potential crash
I'm not sure about this one, as we test name at the start of the function and event->name shouldn't be NULL, but hey, we have the safe compare function, so let's use it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c
index 2302822fe..c1bcc40fa 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -341,7 +341,7 @@ struct event *get_next_event_mutable(struct event *event, const char *name)
if (!name || !*name)
return NULL;
while (event) {
- if (!strcmp(event->name, name))
+ if (same_string(event->name, name))
return event;
event = event->next;
}