diff options
Diffstat (limited to 'lib/northbound_oper.c')
| -rw-r--r-- | lib/northbound_oper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/northbound_oper.c b/lib/northbound_oper.c index 6a3c21b237..bde2228012 100644 --- a/lib/northbound_oper.c +++ b/lib/northbound_oper.c @@ -1492,8 +1492,9 @@ static enum nb_error __walk(struct nb_op_yield_state *ys, bool is_resume) */ len = darr_strlen(ys->xpath); if (ni->keys.num) { - yang_get_key_preds(ys->xpath + len, sib, - &ni->keys, + darr_ensure_avail(ys->xpath, + yang_get_key_pred_strlen(sib, &ni->keys) + 1); + yang_get_key_preds(ys->xpath + len, sib, &ni->keys, darr_cap(ys->xpath) - len); } else { /* add a position predicate (1s based?) */ |
