mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Make sure the incoming data ins't NULL before strduping it
This commit is contained in:
committed by
Jason Gerard DeRose
parent
75f2cba679
commit
a10dc1e59c
+6
-1
@@ -86,7 +86,12 @@ get_config_entry(char * in_data, const char *section, const char *key)
|
||||
char *ptr, *p, *tmp;
|
||||
char *line;
|
||||
int in_section = 0;
|
||||
char * data = strdup(in_data);
|
||||
char * data;
|
||||
|
||||
if (NULL == in_data)
|
||||
return NULL;
|
||||
else
|
||||
strdup(in_data);
|
||||
|
||||
for (line = strtok_r(data, "\n", &ptr); line != NULL;
|
||||
line = strtok_r(NULL, "\n", &ptr)) {
|
||||
|
||||
Reference in New Issue
Block a user