Fix bug in backwards_compatibility test case.

The memset() filled also the extensions field, which was just
waiting for a crash to happen.
This commit is contained in:
Petteri Aimonen
2014-12-26 23:03:04 +02:00
parent 1515cfb5c2
commit 58643217b1

View File

@@ -22,10 +22,7 @@
the decoding and checks the fields. */
bool check_alltypes(pb_istream_t *stream, int mode)
{
AllTypes alltypes;
/* Fill with garbage to better detect initialization errors */
memset(&alltypes, 0xAA, sizeof(alltypes));
AllTypes alltypes = {0};
if (!pb_decode(stream, AllTypes_fields, &alltypes))
return false;