message: demo: Add malformed header coverage tests for index/vertex codec
diff: @@ -581,6 +581,17 @@ void encodeIndexCoverage()
  assert(result < 0);
  }
  +
  + // check that decoder doesn't accept malformed headers
  + {
  + std::vector<unsigned char> brokenbuffer(buffer);
  + brokenbuffer[0] = 0;
  +
  + int result = meshopt_decodeIndexBuffer(destination, index_count, &brokenbuffer[0], brokenbuffer.size());
  + (void)result;
  +
  + assert(result < 0);
  + }
  }
  template <typename PV>
  @@ -684,6 +695,17 @@ void encodeVertexCoverage()
  assert(result < 0);
  }
  +
  + // check that decoder doesn't accept malformed headers
  + {
  + std::vector<unsigned char> brokenbuffer(buffer);
  + brokenbuffer[0] = 0;
  +
  + int result = meshopt_decodeVertexBuffer(destination, vertex_count, sizeof(PV), &brokenbuffer[0], brokenbuffer.size());
  + (void)result;
  +
  + assert(result < 0);
  + }
  }
  void stripify(const Mesh& mesh)
  