protobuf2json-c icon indicating copy to clipboard operation
protobuf2json-c copied to clipboard

error

Open dr-begemot opened this issue 6 years ago • 0 comments

In section PROTOBUF_C_LABEL_REPEATED (func protobuf2json_process_message) protobuf_values_count is offset for value, not size! const size_t *protobuf_values_count = (const size_t *)protobuf_value_quantifier; then you use it as size

        for (j = 0; j < *protobuf_values_count; j++) {
          const char *protobuf_value_repeated = (*(char * const *)protobuf_value) + j * value_size;
...

dr-begemot avatar Oct 24 '19 10:10 dr-begemot