Skip to content

Commit

Permalink
Fixes a memcpy call with nullptr in cn (UBSAN).
Browse files Browse the repository at this point in the history
Updates: NFSE-4097
  • Loading branch information
jjacob512 authored and jenkins committed Jul 7, 2020
1 parent e3faf96 commit e8fde9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cn/cn_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ kvset_iterv_release(uint iterc, struct kv_iterator **iterv, struct workqueue_str
size_t sz, itervsz;
uint i;

if (!iterc)
return;

if (wq) {
itervsz = sizeof(w->kir_iterv[0]) * iterc;
sz = sizeof(*w) + itervsz;
Expand Down

0 comments on commit e8fde9e

Please sign in to comment.