A command like `dbus-test-tool spam --payload=abcde --bytes` could
previously have left the length uninitialized.
Detected by compiling with gcc 14.
Signed-off-by: Simon McVittie <smcv@collabora.com>
int queue_len = 1;
const char *payload = NULL;
char *payload_buf = NULL;
- size_t payload_len;
+ size_t payload_len = 0;
int payload_type = DBUS_TYPE_STRING;
DBusMessage *template = NULL;
dbus_bool_t flood = FALSE;
else if (strstr (arg, "--payload=") == arg)
{
payload = arg + strlen ("--payload=");
+ payload_len = strlen (payload);
}
else if (strcmp (arg, "--stdin") == 0)
{