Skip to content

Commit edd8919

Browse files
committed
fixed overflow when copying data from C to Python arrays
1 parent ecef616 commit edd8919

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/higher-level/py-udf-hl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ char bandname[NPOW_10];
511511
+++ Return: SUCCESS/FAILURE
512512
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/
513513
int python_udf(ard_t *ard, udf_t *udf_, tsa_t *ts, small *mask_, int submodule, char *idx_name, int nx, int ny, int nc, int nb, int nt, short nodata, par_udf_t *udf, int cthread){
514-
int b, t, k, p;
514+
int b, t, p;
515+
size_t k;
515516
py_dimlab_t pylab;
516517
npy_intp dim_data[4] = { nt, nb, ny, nx };
517518
FILE *fpy = NULL;

0 commit comments

Comments
 (0)