summaryrefslogtreecommitdiff
path: root/examples/mrp_client
diff options
context:
space:
mode:
authorAndrew Elder <aelder@audioscience.com>2014-09-23 12:17:44 -0400
committerAndrew Elder <aelder@audioscience.com>2014-09-24 09:37:33 -0400
commit11dc925aae54451f739898adb5865280b7e832ad (patch)
tree1080e24b8e5b02b2463ce5b57f655b7ffbe573d0 /examples/mrp_client
parentd44e96044a23881426a708c2326d08b34657332b (diff)
downloadOpen-AVB-11dc925aae54451f739898adb5865280b7e832ad.tar.gz
MRP: mrp_client: mrphelper, add mrp_app_state_mapping[] bounds check to mrpdhelper_to_string()
Diffstat (limited to 'examples/mrp_client')
-rwxr-xr-xexamples/mrp_client/mrpdhelper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/mrp_client/mrpdhelper.c b/examples/mrp_client/mrpdhelper.c
index 6e3d13c4..ddd5a958 100755
--- a/examples/mrp_client/mrpdhelper.c
+++ b/examples/mrp_client/mrpdhelper.c
@@ -453,7 +453,10 @@ int mrpdhelper_to_string(struct mrpdhelper_notify *mrpd_data,
break;
}
- szAppState = mrp_app_state_mapping[mrpd_data->app_state].s;
+ if (mrpd_data->app_state < MRPD_N_APP_STATE_STRINGS)
+ szAppState = mrp_app_state_mapping[mrpd_data->app_state].s;
+ else
+ szAppState = mrp_app_state_mapping[0].s;
status = snprintf(szString, 128, "R=%" SCNx64 " %s,%s,%s",
mrpd_data->registrar,