mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Fix bug in emalloc of start and count.
This commit is contained in:
parent
4a089699c9
commit
ddf6b6722f
@ -814,8 +814,8 @@ copy_var_data(int igrp, int varid, int ogrp, size_t copybuf_size) {
|
||||
stat = nc_get_iter(igrp, varid, copybuf_size, &iter);
|
||||
CHECK(stat, nc_get_iter);
|
||||
|
||||
start = (size_t *) emalloc(nvalues * sizeof(size_t));
|
||||
count = (size_t *) emalloc(nvalues * sizeof(size_t));
|
||||
start = (size_t *) emalloc(iter.rank * sizeof(size_t));
|
||||
count = (size_t *) emalloc(iter.rank * sizeof(size_t));
|
||||
/* nc_next_iter() initializes start and count on first call,
|
||||
* changes start and count to iterate through whole variable on
|
||||
* subsequent calls. */
|
||||
|
Loading…
Reference in New Issue
Block a user