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

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