Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
- data = file_data_read(path, size, chunk_size, offset);
+ data = file_data_read(path, size, chunk_size > size ? size : chunk_size, offset);
if (data == NULL) {
ipc_client_log(client, "Reading nv_data failed");
return NULL;
if (data == NULL) {
ipc_client_log(client, "Reading nv_data failed");
return NULL;
- rc = file_data_write(path, data, size, chunk_size, offset);
+ rc = file_data_write(path, data, size, chunk_size > size ? size : chunk_size, offset);
if (rc < 0) {
ipc_client_log(client, "Writing nv_data failed");
goto error;
if (rc < 0) {
ipc_client_log(client, "Writing nv_data failed");
goto error;