mirror of
https://github.com/darlinghq/darling-dbuskit.git
synced 2024-11-23 04:09:42 +00:00
Fix off-by-one error when unmarshalling multiple return values. (Reported by Marcus Müller)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@37642 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
433c159d5c
commit
88265c5ae2
@ -1,3 +1,8 @@
|
||||
2014-01-29 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Source/DKMethod.m: Fix off-by-one error when unmarshalling
|
||||
multiple return values.
|
||||
|
||||
2014-01-29 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Documentation/UsingDBus.texi: Document how
|
||||
|
@ -563,11 +563,13 @@
|
||||
* Proceed to the next value in the message, but raise an exception if
|
||||
* we are missing some.
|
||||
*/
|
||||
if (NO == (BOOL)dbus_message_iter_next(iter))
|
||||
if ((NO == (BOOL)dbus_message_iter_next(iter))
|
||||
&& (numArgs > (index + 1)))
|
||||
{
|
||||
DKArgument *nextArg = [outArgs objectAtIndex: index + 1];
|
||||
[NSException raise: @"DKMethodUnmarshallingException"
|
||||
format: @"D-Bus message too short when unmarshalling return value for '%@'.",
|
||||
name];
|
||||
format: @"D-Bus message too short when unmarshalling return value for '%@'. Expected value for argument %@ of type %c.",
|
||||
name, [nextArg name], [nextArg DBusType]];
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user