File: java-test-TestH5Arw_array-overflow.patch

package info (click to toggle)
hdf5 1.14.5%2Brepack-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 208,864 kB
  • sloc: ansic: 715,772; f90: 42,941; java: 38,102; sh: 30,925; xml: 18,706; cpp: 18,011; makefile: 2,423; perl: 2,383; yacc: 332; python: 262; javascript: 203; lex: 157; ruby: 24; csh: 22
file content (20 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix array overflow
 DIM_X=8
 DIM128_Y=128
 The dataset has 8x128 values, which matches the array's firt two
 dimensions.
 Each value is a 128 bit float.
 Because 128 bits = 16 bytes, the third dimension of the array should be 16.
Index: hdf5/java/test/TestH5Arw.java
===================================================================
--- hdf5.orig/java/test/TestH5Arw.java
+++ hdf5/java/test/TestH5Arw.java
@@ -460,7 +460,7 @@ public class TestH5Arw {
     @Test
     public void testH5Aread_128bit_floats()
     {
-        byte[][][] attr_data = new byte[DIM_X][DIM128_Y][8];
+        byte[][][] attr_data = new byte[DIM_X][DIM128_Y][16];
 
         try {
             openH5file(H5_FLTS_FILE, DATASETF128);