From e22de7afe91afdbc8857ae93625312050aeaa23e Mon Sep 17 00:00:00 2001 From: "nicolas.marie" <nicolas.marie@ensiie.eu> Date: Mon, 8 Jan 2024 09:31:20 +0100 Subject: [PATCH] fixe segv in gpu implementation --- Projet/CODE/apm/src/apm_gpu.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projet/CODE/apm/src/apm_gpu.cu b/Projet/CODE/apm/src/apm_gpu.cu index da72bab..da11c42 100644 --- a/Projet/CODE/apm/src/apm_gpu.cu +++ b/Projet/CODE/apm/src/apm_gpu.cu @@ -57,7 +57,7 @@ read_input_file_max(int fd, int *size, off_t offset) printf("diff: %i\n", to_read); #endif /* Allocate data to copy the target text */ - buf = (char *) malloc(fsize * sizeof(char)); + buf = (char *) malloc(to_read * sizeof(char)); if (buf == NULL) { -- GitLab