aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_acl.c')
-rw-r--r--libarchive/archive_acl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c
index 4736531afa1d..9941d2f6fdb2 100644
--- a/libarchive/archive_acl.c
+++ b/libarchive/archive_acl.c
@@ -2058,6 +2058,12 @@ next_field(const char **p, const char **start,
}
*sep = **p;
+ /* If the field is only whitespace, bail out now. */
+ if (**p == '\0') {
+ *end = *p;
+ return;
+ }
+
/* Trim trailing whitespace to locate end of field. */
*end = *p - 1;
while (**end == ' ' || **end == '\t' || **end == '\n') {