File: fix-unaligned-access.patch

package info (click to toggle)
h5py 3.7.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,576 kB
  • sloc: python: 10,451; ansic: 579; makefile: 403; sh: 18
file content (15 lines) | stat: -rw-r--r-- 486 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Index: h5py/h5py/_conv.pyx
===================================================================
--- h5py.orig/h5py/_conv.pyx	2021-08-24 16:51:44.055509270 +0200
+++ h5py/h5py/_conv.pyx	2021-11-09 23:46:16.889853530 +0100
@@ -841,8 +841,8 @@
 
     H5Tconvert(intype.id, outtype.id, len, data, NULL, H5P_DEFAULT)
 
-    in_vlen[0].len = len
-    in_vlen[0].ptr = data
+    memcpy(&in_vlen[0].len, &len, sizeof(size_t))
+    memcpy(&in_vlen[0].ptr, &data, sizeof(void*))
 
     return 0