It's good that those Qualys folks were looking over my
shoulder. They suggested a change to that commit shown
below. This improvement was obviously a better choice.
Reference(s):
. original change
commit
f9a8009e27d47a61096ff7bf1de37a90f0f801e6
Signed-off-by: Jim Warner <james.warner@comcast.net>
while (',' == *s) ++s;
gid = strtol(s, &end, 10);
- if (end <= s) {
- if (!p->supgrp)
- p->supgrp = xstrdup("-");
- break;
- }
+ if (end <= s) break;
s = end;
g = pwcache_get_group(gid);
else if (len >= max) len = max-1;
t += len;
} while (*s);
+
+ if (!p->supgrp)
+ p->supgrp = xstrdup("-");
}
///////////////////////////////////////////////////////////////////////