1 From fa7438a0ff4033e4741c807394a9af6207940d71 Mon Sep 17 00:00:00 2001
2 From: Joerg Sonnenberger <joerg@bec.de>
3 Date: Tue, 5 Sep 2017 18:12:19 +0200
4 Subject: [PATCH] Do something sensible for empty strings to make fuzzers
7 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
9 Upstream status: commit fa7438a0ff
11 libarchive/archive_read_support_format_xar.c | 8 +++++++-
12 1 file changed, 7 insertions(+), 1 deletion(-)
14 diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c
15 index 7a22beb9d8e4..93eeacc5e6eb 100644
16 --- a/libarchive/archive_read_support_format_xar.c
17 +++ b/libarchive/archive_read_support_format_xar.c
18 @@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt)
27 while (digit >= 0 && digit < 10 && char_cnt-- > 0) {
28 @@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt)
38 while (char_cnt-- > 0) {
39 if (*p >= '0' && *p <= '7')