diff --git a/exec/coroparse.c b/exec/coroparse.c index 374ed7dd..ac654a11 100644 --- a/exec/coroparse.c +++ b/exec/coroparse.c @@ -139,6 +139,12 @@ static int uid_determine (const char *req_user) long int id; char *ep; + if(*req_user == '\0') { + sprintf (error_string_response, + "The user can not be empty, please read the documentation."); + return (-1); + } + id = strtol(req_user, &ep, 10); if (*ep == '\0' && id >= 0 && id <= UINT_MAX) { return (id); @@ -193,6 +199,12 @@ static int gid_determine (const char *req_group) long int id; char *ep; + if(*req_group == '\0') { + sprintf (error_string_response, + "The group can not be empty, please read the documentation."); + return (-1); + } + id = strtol(req_group, &ep, 10); if (*ep == '\0' && id >= 0 && id <= UINT_MAX) { return (id); -- 2.13.6