Blame SOURCES/0012-volumes-fix-segfault-in-apfs-volume-code.patch

b58cad
From 82df4fa7d3705f2f61282ed5b22074d4e0a6efc4 Mon Sep 17 00:00:00 2001
b58cad
From: Harry Mallon <hjmallon@gmail.com>
b58cad
Date: Thu, 23 Apr 2020 21:18:47 +0100
b58cad
Subject: [PATCH 12/17] volumes: fix segfault in apfs volume code
b58cad
b58cad
---
b58cad
 src/core/volumes.cc | 3 ++-
b58cad
 1 file changed, 2 insertions(+), 1 deletion(-)
b58cad
b58cad
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
b58cad
index e70352377f84..6fce2ee3de1c 100644
b58cad
--- a/src/core/volumes.cc
b58cad
+++ b/src/core/volumes.cc
b58cad
@@ -784,12 +784,13 @@ struct apfs_super_block {
b58cad
 
b58cad
 static bool detect_apfs(hwNode & n, source & s)
b58cad
 {
b58cad
-  static char buffer[sizeof(apfs_super_block)];
b58cad
+  static char buffer[APFS_STANDARD_BLOCK_SIZE];
b58cad
   source apfsvolume;
b58cad
   apfs_super_block *sb = (apfs_super_block*)buffer;
b58cad
   unsigned long block_size;
b58cad
 
b58cad
   apfsvolume = s;
b58cad
+  apfsvolume.blocksize = APFS_STANDARD_BLOCK_SIZE;
b58cad
 
b58cad
   if(readlogicalblocks(apfsvolume, buffer, 0, 1)!=1)
b58cad
     return false;
b58cad
-- 
b58cad
2.17.1
b58cad