libpwdgrp: tokenizer fix for trailing whitespace removeal.

The tokenize() function trims trailing whitespace via
overlapping_strcpy() but continues to reference the stale *end
pointer. Fixing this.

function                                             old     new   delta
tokenize                                             120     119      -1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko committed 2026-09-22 02:19:06 +02:00
1 parent 556567f403
commit c2dec52d37
1 file changed
+1 -1
+1 -1
View File
@@ -171,7 +171,7 @@ static int tokenize(char *buffer, int ch)
if (p != end)
overlapping_strcpy(p, end);
num_fields++;
if (*end == '\0') {
if (*p == '\0') {
S.tokenize_end = p + 1;
return num_fields;
}