mdbx: require data == NULL for mdbx_cursor_get(MDBX_SET).

This commit is contained in:
Leo Yuriev 2018-09-03 13:38:40 +03:00
parent 7ffff48fdc
commit 6fb628d88d

View File

@ -7665,6 +7665,9 @@ int mdbx_cursor_get(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
return MDBX_INCOMPATIBLE;
/* FALLTHRU */
case MDBX_SET:
if (op == MDBX_SET && unlikely(data != NULL))
return MDBX_EINVAL;
/* FALLTHRU */
case MDBX_SET_KEY:
case MDBX_SET_RANGE:
if (unlikely(key == NULL))