Update asn1c-usage.tex

The encode function call will crash if it's not initialized. Update the document to make it more clear.
master
fei4xu 2019-06-06 15:14:22 +08:00 committed by Lev Walkin
parent 46b394dd3e
commit 878dc3b383
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ int main(int ac, char **av) {
asn_enc_rval_t ec; /* Encoder return value */
/* Allocate the Rectangle_t */
rectangle = calloc(1, sizeof(Rectangle_t)); /* not malloc! */
rectangle = calloc(1, sizeof(Rectangle_t)); /* must initialize to zero, not malloc! */
if(!rectangle) {
perror("calloc() failed");
exit(1);