mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-08 03:42:12 +03:00
match.c: Add check for NULL arguments passed to match_group()
This commit also initializes the pointers in match_group() to NULL in order to follow libssh coding guidelines. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
committed by
Sahana Prasad
parent
145222eef6
commit
40b2279407
@@ -595,8 +595,12 @@ match_cidr_address_list(const char *address,
|
||||
*/
|
||||
int match_group(const char *group, const char *object)
|
||||
{
|
||||
const char *a;
|
||||
const char *z;
|
||||
const char *a = NULL;
|
||||
const char *z = NULL;
|
||||
|
||||
if (group == NULL || object == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
z = group;
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user