summaryrefslogtreecommitdiff
path: root/libjack/metadata.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2014-11-11 19:29:33 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2014-11-11 19:29:33 +0100
commit83cd6c8493c0aeae80bf404395ccbf40ec2e5529 (patch)
tree54632f568cccb11a5939d24f0d8f6eed862e4995 /libjack/metadata.c
parent93928654345994ae4b6d6d8e83c946a1075d5db9 (diff)
downloadjack1-83cd6c8493c0aeae80bf404395ccbf40ec2e5529.tar.gz
Add memset to clear buffer to unparse uuid into.
- jack_remove_properties and jack_get_properties both search the metadata database for matching UUID string. - However, they both fail at finding any matching UUIDs ever. - The UUID string in the database are correctly created on a previously cleared buffer (e.g. memset to 0). - The temporaty UUID string in the search routines however are not created on a cleared buffer, the end of the buffer thus may contain anything. - As in the matching routine the complete UUID strings are compared (with size JACK_UUID_STRING_SIZE), there will never be a matching air, even if their valid part do match.
Diffstat (limited to 'libjack/metadata.c')
-rw-r--r--libjack/metadata.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libjack/metadata.c b/libjack/metadata.c
index 339f56c..fe912a1 100644
--- a/libjack/metadata.c
+++ b/libjack/metadata.c
@@ -302,6 +302,7 @@ jack_get_properties (jack_uuid_t subject,
desc->properties = NULL;
desc->property_cnt = 0;
+ memset(ustr, 0, JACK_UUID_STRING_SIZE);
jack_uuid_unparse (subject, ustr);
if (jack_property_init (NULL)) {
@@ -595,6 +596,7 @@ jack_remove_properties (jack_client_t* client, jack_uuid_t subject)
int retval = 0;
uint32_t cnt = 0;
+ memset(ustr, 0, JACK_UUID_STRING_SIZE);
jack_uuid_unparse (subject, ustr);
if (jack_property_init (NULL)) {