mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:54:58 +00:00
a89bf734a9
The scan key module API provides the scan callback with the current field name and value (if it exists). Those arguments are RedisModuleString* which means it supposes to point to robj which is encoded as a string. Using createStringObjectFromLongLong function might return robj that points to an integer and so break a module that tries for example to use RedisModule_StringPtrLen on the given field/value. The PR introduces a fix that uses the createObject function and sdsfromlonglong function. Using those function promise that the field and value pass to the to the scan callback will be Strings. The PR also changes the Scan test module to use RedisModule_StringPtrLen to catch the issue. without this, the issue is hidden because RedisModule_ReplyWithString knows to handle integer encoding of the given robj (RedisModuleString). The PR also introduces a new test to verify the issue is solved. |
||
---|---|---|
.. | ||
auth.c | ||
blockonkeys.c | ||
commandfilter.c | ||
datatype.c | ||
fork.c | ||
hooks.c | ||
infotest.c | ||
Makefile | ||
misc.c | ||
propagate.c | ||
scan.c | ||
testrdb.c |