blob: 52940b3c26c99b0fbe9d07e7ea3a3bb92d807489 [file] [log] [blame]
Juraj Vijtiukf3939c92019-05-14 13:07:38 +02001#include <stdio.h>
2#include <stdlib.h>
3
4#include "libyang.h"
5
6int main(int argc, char **argv) {
7
8 if (argc != 2) {
9 fprintf(stderr, "invalid usage\n");
10 exit(EXIT_FAILURE);
11 }
12
13
14 struct ly_ctx *ctx = NULL;
15 LY_ERR err;
16 while (__AFL_LOOP(100)) {
17 err = ly_ctx_new(NULL, 0, &ctx);
18 if (err != LY_SUCCESS) {
19 fprintf(stderr, "Failed to create context\n");
20 exit(EXIT_FAILURE);
21 }
22
23 lys_parse_path(ctx, argv[1], LYS_IN_YANG);
24 ly_ctx_destroy(ctx, NULL);
25 }
26}