when compare metadata value using metadat filter
there is need to check the exact matching of values using 'strcmp' not 'strstr'
Change-Id: I61f85c4a3e50278077730eb7190caeb0f6b484eb
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
auto* node = reinterpret_cast<metadata_x*>(it->data);
if (node->key != nullptr) {
auto metadata = metadata_map.find(node->key);
- if (metadata != metadata_map.end() &&
- strstr(node->value ? node->value : "",
- metadata->second.c_str()) != nullptr) {
+ if (metadata == metadata_map.end())
+ continue;
+
+ if (metadata->second.empty() ||
+ strcmp(node->value ? node->value : "",
+ metadata->second.c_str()) == 0) {
pass = true;
break;
}