mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Add error checking of strdup.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@343 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -591,6 +591,9 @@ static int match(char *group,char *object){
|
||||
char *ptr,*saved;
|
||||
char *end;
|
||||
ptr=strdup(group);
|
||||
if (ptr == NULL) {
|
||||
return -1;
|
||||
}
|
||||
saved=ptr;
|
||||
while(1){
|
||||
end=strchr(ptr,',');
|
||||
|
||||
Reference in New Issue
Block a user