Skip to content

Commit

Permalink
Explicitly check for NULL for groupname
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlexis committed Apr 24, 2017
1 parent 4fbddf6 commit a598db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sniproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ drop_perms(const char *username, const char *groupname) {

gid_t gid = user->pw_gid;

if (groupname) {
if (groupname != NULL) {
errno = 0;
struct group *group = getgrnam(groupname);
if (errno)
Expand Down

0 comments on commit a598db4

Please sign in to comment.