• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libarchive/0001-Do-something-sensible-for-empty-strings-to-make-fuzz.patch
Baruch SiachBaruch Siach committed f871b21c89e09 Sep 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
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
5
 happy.
6
​
7
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
8
---
9
Upstream status: commit fa7438a0ff
10
​
11
 libarchive/archive_read_support_format_xar.c | 8 +++++++-
12
 1 file changed, 7 insertions(+), 1 deletion(-)
13
​
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)
19
    uint64_t l;
20
    int digit;
21
 
22
+   if (char_cnt == 0)
23
+       return (0);
24
+
25
    l = 0;
26
    digit = *p - '0';
27
    while (digit >= 0 && digit < 10  && char_cnt-- > 0) {
28
@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt)
29
 {
30
    int64_t l;
31
    int digit;
32
-        
33
+
34
+   if (char_cnt == 0)
35
+       return (0);
36
+
37
    l = 0;
38
    while (char_cnt-- > 0) {
39
        if (*p >= '0' && *p <= '7')
40
-- 
41
2.14.1
42
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.