astac argument checks

This commit is contained in:
2019-08-13 20:35:05 -07:00
committed by Michael Davidsaver
parent fd48ee9aec
commit 05cd95a821

View File

@@ -240,6 +240,10 @@ int astac(const char *pname,const char *user,const char *location)
char *puser;
char *plocation;
if (!pname || !user || !location){
printf("Usage: astac \"record name\", \"user\", \"host\"\n");
return(1);
}
paddr = dbCalloc(1,sizeof(DBADDR) + sizeof(ASCLIENTPVT));
pasclientpvt = (ASCLIENTPVT *)(paddr + 1);
status=dbNameToAddr(pname,paddr);