Skip to content

Commit

Permalink
Merge pull request #339 from rdvincent/master
Browse files Browse the repository at this point in the history
Another fix for #332, avoid reading past valid link records.
  • Loading branch information
natacha-beck authored Nov 13, 2017
2 parents bbd20fd + 0e67f88 commit 22a49fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/brainbrowser/volume-viewer/volume-loaders/hdf5.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,11 @@
var fh = hdf5FractalHeapHeader();
var n_msg = 0;
hdf5FractalHeapEnumerate( fh, function(row, address, block_offset, block_length) {
var end_address = address + block_length;
/* Avoid errors caused by extra alignment bytes by
* ignoring the last few bytes in the block, if
* present.
*/
var end_address = address + block_length - 4;
while (n_msg < fh.heap_nobj && tell() < end_address) {
hdf5MsgLink(link);
n_msg += 1;
Expand Down

0 comments on commit 22a49fb

Please sign in to comment.