Commit graph

8 commits

Author SHA1 Message Date
Philip Withnall
f8af4ad525 tools: Improve argument validation in dbus-spam
Check that at most one argument which sets the payload is provided, so
the allocated payload is not overwritten and leaked.

Coverity ID: 54759

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99693
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2017-02-13 14:52:19 +00:00
Simon McVittie
7959d90719 Add missing function attributes suggested by clang (but not by gcc)
clang is a little more enthusiastic about suggesting these.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-10-13 22:44:13 +01:00
Ralf Habacker
d2b8b8611e Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]".
The warnings are fixed by adding functions to dbus string name
space returning unsigned char pointer, which avoids the need to
use casts.

Bug: https://bugs.freedesktop.org/attachment.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-11-24 12:26:00 +01:00
Ralf Habacker
1d2976e4bd dbus_test_tool_spam: Fix 'variable payload going out of scope leaks the storage it points to' (CID 54759)
Reported by Coverity: CID 54759: Resource leak (RESOURCE_LEAK)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-05-01 23:04:59 +02:00
Ralf Habacker
580b44f72d dbus_test_tool_spam: Fix 'variable random_sizes going out of scope leaks the storage it points to' (CID 54761)
Reported by Coverity: CID 54761: Resource leak (RESOURCE_LEAK)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-05-01 23:04:52 +02:00
Ralf Habacker
d0fe556af1 Trivial -Wsign-compare fixes.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-04 12:18:42 +01:00
Alban Crequy
75b35badb7 dbus-test-tool spam: add --messages-per-conn=N
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34140
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-10-14 13:53:57 +01:00
Alban Crequy
10f8b67a9f Add dbus-test-tool, currently with "echo" and "spam" modes
This is installed by default, but easy to filter out for embedded systems
or whatever.

Based on earlier work by Simon McVittie and Will Thompson

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34140
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-10-14 13:53:54 +01:00