summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/login_cap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c
index 392f320..d8e0f62 100644
--- a/lib/libutil/login_cap.c
+++ b/lib/libutil/login_cap.c
@@ -476,7 +476,7 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) {
rlim_t val = STRTOV(res, &ep, 0);
if ((res == NULL) || (res == ep) || errno)
return error;
- switch (*ep) {
+ switch (*ep++) {
case 0: /* end of string */
ep--;
mult = 1;
@@ -496,6 +496,7 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) {
default:
return error;
}
+ res = ep;
tot += (val * mult);
}
return tot;
OpenPOWER on IntegriCloud