diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-02-26 01:55:39 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-02-26 01:55:39 -0800 |
commit | d351981f9e4f9ef5184e35e98ad14df305c91def (patch) | |
tree | 5deaeef0e49637fa2c35dd853a7598f0b59f98ca /tests.c | |
parent | e67f5d5f02a6b5529d2a1a27b7e729bce853f337 (diff) |
Change to a fixed stack size.
Proto2 only allows a nesting depth of 64, so we follow suit.
Diffstat (limited to 'tests.c')
-rw-r--r-- | tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -47,7 +47,7 @@ void test_simple_proto() /* These are the examples from * http://code.google.com/apis/protocolbuffers/docs/encoding.html */ struct pbstream_fieldset *fieldset1 = malloc(sizeof(*fieldset1) + - 2*sizeof(struct pbstream_field)); + sizeof(struct pbstream_field[2])); fieldset1->num_fields = 2; fieldset1->fields[0].field_number = 1; fieldset1->fields[0].type = PBSTREAM_TYPE_INT32; @@ -79,7 +79,7 @@ void test_simple_proto() pbstream_free_parser(&s); struct pbstream_fieldset *fieldset2 = malloc(sizeof(*fieldset1) + - 3*sizeof(struct pbstream_field)); + sizeof(struct pbstream_field[3])); fieldset2->num_fields = 3; fieldset2->fields[2].field_number = 3; fieldset2->fields[2].type = PBSTREAM_TYPE_MESSAGE; |