Skip to content

Commit

Permalink
Allocate memory on the test_package cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ericriff committed Dec 21, 2019
1 parent d491c4c commit fdc0053
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/tinycbor/all/test_package/example.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include <stdio.h>
#include <stdlib.h>
#include "cbor.h"

int main(int argc, char *argv[])
{
CborParser parser;
CborValue it;
size_t length;
uint8_t *buf;
uint8_t *buf = (uint8_t*)malloc(sizeof(int[10]));
CborError err = cbor_parser_init(buf, length, 0, &parser, &it);

printf("Tinycbor test_package ran successfully \n");
Expand Down

0 comments on commit fdc0053

Please sign in to comment.