diff --git a/mod/box/box.m b/mod/box/box.m index 0066c47e8dd55a5da49df818b1a8df12b44ab8aa..420e0dd0678c7bfdbe1d2e6611e63b3fcc7a17b2 100644 --- a/mod/box/box.m +++ b/mod/box/box.m @@ -581,7 +581,10 @@ process_select(struct box_txn *txn, u32 limit, u32 offset, struct tbuf *data) return; u32 key_len = read_u32(data); - void *key = read_field(data); + void *key = NULL; + + if (key_len != 0) + key = read_field(data); /* advance remaining fields of a key */ for (int i = 1; i < key_len; i++)