summaryrefslogtreecommitdiff
path: root/test_packet.c
diff options
context:
space:
mode:
authorAndrey Mazo <mazo@telum.ru>2013-09-26 21:06:05 +0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-26 13:34:44 -0400
commit832e1fb1749ee24583d2f7f1dc7ce7b9e68126f9 (patch)
treed1c2b0aa4a24e66d345a7048586ac1147ae958f3 /test_packet.c
parentab7d706918b859f5cc38f520c8d41098de411a89 (diff)
downloadgpsd-832e1fb1749ee24583d2f7f1dc7ce7b9e68126f9.tar.gz
Fixed incorrect string argument to dbus_message_get_args().
Existing behavior leads to unexpected results because it's actually something like static char gpsd_devname[BUFSIZ]; ... *((char**)&gpsd_devname) = "qqq"; which actually stores address of "qqq" in first several bytes of gpsd_devname[] (at least with gcc and clang). DBus documentation on dbus_message_get_args() [1] states that "The variable argument list should contain the type of the argument followed by a pointer to where the value should be stored." ".. the returned values are constant; do not free them. They point into the DBusMessage." [1] http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#gad8953f53ceea7de81cde792e3edd0230 Signed-off-by: Andrey Mazo <mazo@telum.ru>
Diffstat (limited to 'test_packet.c')
0 files changed, 0 insertions, 0 deletions