File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,22 @@ macro_rules! redis_module {
190190 use $crate:: configuration:: get_bool_default_config_value;
191191 use $crate:: configuration:: get_enum_default_config_value;
192192
193+ if ctx. is_null( ) {
194+ return raw:: Status :: Err as _;
195+ }
196+
197+ if argv. is_null( ) && argc != 0 {
198+ return raw:: Status :: Err as _;
199+ }
200+
201+ if !argv. is_null( ) && unsafe { ( * argv) . is_null( ) } {
202+ return raw:: Status :: Err as _;
203+ }
204+
205+ if !argv. is_null( ) && unsafe { !( * argv) . is_null( ) } && argc. is_negative( ) {
206+ return raw:: Status :: Err as _;
207+ }
208+
193209 // We use a statically sized buffer to avoid allocating.
194210 // This is needed since we use a custom allocator that relies on the Redis allocator,
195211 // which isn't yet ready at this point.
You can’t perform that action at this time.
0 commit comments