diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3b2fc93..dad6523a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,7 +110,7 @@ test_valgrind: extends: - .standard_job script: - - meson setup _build -Ddrivers=all + - meson setup _build -Ddrivers=all -Dintrospection=false - meson compile -C _build - meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind artifacts: diff --git a/libfprint/drivers/fpcmoc/fpc.c b/libfprint/drivers/fpcmoc/fpc.c index 466a8096..eb2729db 100644 --- a/libfprint/drivers/fpcmoc/fpc.c +++ b/libfprint/drivers/fpcmoc/fpc.c @@ -272,15 +272,14 @@ static void fpc_cmd_ssm_done (FpiSsm *ssm, FpDevice *dev, GError *error) { FpiDeviceFpcMoc *self = FPI_DEVICE_FPCMOC (dev); - CommandData *data = fpi_ssm_get_data (ssm); self->cmd_ssm = NULL; /* Notify about the SSM failure from here instead. */ if (error) { fp_err ("%s error: %s ", G_STRFUNC, error->message); - if (data->callback) - data->callback (self, NULL, error); + if (fpi_ssm_get_data (ssm)->callback) + fpi_ssm_get_data (ssm)->callback (self, NULL, error); } } diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c index 3256b7d5..e8044d6b 100644 --- a/libfprint/drivers/upeksonly.c +++ b/libfprint/drivers/upeksonly.c @@ -292,7 +292,7 @@ handoff_img (FpImageDevice *dev) guint cropped_rows; guint out_height; guint row_count = g_slist_length (self->rows); - g_autofree guchar **rows = g_new (guchar *, row_count); + g_autofree guchar **rows = g_new0 (guchar *, row_count); guint row_idx = 0; if (row_count != self->num_rows) @@ -331,7 +331,15 @@ handoff_img (FpImageDevice *dev) guint src_y = crop_start + y * IMG_HEIGHT_SCALE_1002 + i; guint src_x = IMG_CROP_X_1002 + x; - sum += rows[src_y][src_x]; + if (src_y >= row_count) + continue; + + guchar *src_row = rows[src_y]; + + if (!src_row) + continue; + + sum += src_row[src_x]; } img->data[y * IMG_CROP_WIDTH_1002 + x] = sum / IMG_HEIGHT_SCALE_1002;