projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
253c845
)
metadata: warn if collected names are ill-formatted
author
David Herrmann
<dh.herrmann@gmail.com>
Sat, 10 Jan 2015 12:38:48 +0000
(13:38 +0100)
committer
David Herrmann
<dh.herrmann@gmail.com>
Sat, 10 Jan 2015 12:43:32 +0000
(13:43 +0100)
Make sure we properly collect owned-names items, just like we verify all
our other item generators.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
metadata.c
patch
|
blob
|
history
diff --git
a/metadata.c
b/metadata.c
index 47dd52a1a8e83f7310509fc22d1ee0850de4ceaf..ad548c5b26710fc0bf42b6969a661ba1af151870 100644
(file)
--- a/
metadata.c
+++ b/
metadata.c
@@
-578,6
+578,9
@@
int kdbus_meta_add_conn_info(struct kdbus_meta *meta,
item = KDBUS_ITEM_NEXT(item);
}
+ /* sanity check: the buffer should be completely written now */
+ WARN_ON((u8 *)item != (u8 *)meta->owned_names_items + size);
+
meta->collected |= KDBUS_ATTACH_NAMES;
}