]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Initialize to zero only size + check for null 1408/head
authorKirill Zhumarin <kirill.zhumarin@gmail.com>
Thu, 2 Jul 2020 12:25:35 +0000 (15:25 +0300)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2020 12:25:35 +0000 (15:25 +0300)
libarchive/archive_read_support_format_rar5.c

index 2eff80ca21405482bbc201f53e46afdc7c8d5e23..2c36db314702a0763c375382054228415906fc5d 100644 (file)
@@ -3906,8 +3906,8 @@ static int rar5_read_data(struct archive_read *a, const void **buff,
        int ret;
        struct rar5* rar = get_context(a);
 
-       *offset = 0;
-       *size = 0;
+       if (size)
+               *size = 0;
 
        if(rar->file.dir > 0) {
                /* Don't process any data if this file entry was declared