1
0
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:
Eshan Kelkar
2024-06-11 09:44:08 +05:30
committed by Sahana Prasad
parent 145222eef6
commit 40b2279407

View File

@@ -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 {