Philip Withnall 4624fc06ba gdbusmessage: Check for valid GVariantType when parsing a variant blob
The code was checking whether the signature provided by the blob was a
valid D-Bus signature — but that’s a superset of a valid GVariant type
string, since a D-Bus signature is zero or more complete types. A
GVariant type string is exactly one complete type.

This meant that a D-Bus message with a header field containing a variant
with an empty type signature (for example) could cause a critical
warning in the code parsing it.

Fix that by checking whether the string is a valid type string too.

Unit test included.

oss-fuzz#9810

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-06 12:06:51 +00:00
..
2013-07-11 13:49:20 -04:00
2013-11-23 22:21:29 -05:00
2014-09-09 14:11:38 -04:00
2015-02-23 10:40:40 -05:00
2014-01-01 22:01:15 -05:00
2017-05-29 19:53:34 +02:00
2016-04-26 15:20:16 +02:00
2014-06-28 14:06:36 -04:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-10-10 13:51:06 -04:00
2017-05-29 19:53:34 +02:00
2014-01-13 16:12:31 -05:00
2012-10-16 09:39:24 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-10-10 13:51:06 -04:00
2017-05-29 19:53:34 +02:00
2012-10-16 09:39:24 -04:00
2012-10-16 09:39:24 -04:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-01-13 17:12:53 +01:00
2012-12-12 15:20:22 +01:00
2012-10-16 09:39:24 -04:00