bus-message: also properly copy struct signature when skipping

The change is similar to that in the previous commit, but I don't have
a reproducer / test case case for this one, so I'm keeping it seperate.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-08-11 09:02:48 +02:00
parent 73777ddba5
commit 3d338a302f
1 changed files with 3 additions and 3 deletions

View File

@ -5013,9 +5013,9 @@ static int message_skip_fields(
assert(l >= 2);
{
char sig[l-1], *s;
strncpy(sig, *signature + 1, l-1);
s = sig;
char sig[l + 1], *s = sig;
strncpy(sig, *signature + 1, l);
sig[l] = '\0';
r = message_skip_fields(m, ri, (uint32_t) -1, (const char**) &s);
if (r < 0)