summaryrefslogtreecommitdiffstats
path: root/include/image-sparse.h
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2021-01-11 11:32:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-01-13 10:03:37 +0100
commit131bac34d2ce9997fe30eeb3bbd361248befc7d1 (patch)
tree0fc511c20ae4757125c00dbaafd133cdcd205b04 /include/image-sparse.h
parente90d4646fccd388e8611aff44997c34b55eadbc3 (diff)
downloadbarebox-131bac34d2ce9997fe30eeb3bbd361248befc7d1.tar.gz
barebox-131bac34d2ce9997fe30eeb3bbd361248befc7d1.tar.xz
image-sparse: change retlen to size_t
retlen can potentially overflow. Also, write_full() in fastboot_handle_sparse() expects size_t anyway. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/image-sparse.h')
-rw-r--r--include/image-sparse.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/image-sparse.h b/include/image-sparse.h
index 29242f4fd5..6bff844411 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -60,7 +60,7 @@ struct sparse_image_ctx;
struct sparse_image_ctx *sparse_image_open(const char *path);
int sparse_image_read(struct sparse_image_ctx *si, void *buf,
- loff_t *pos, size_t len, int *retlen);
+ loff_t *pos, size_t len, size_t *retlen);
void sparse_image_close(struct sparse_image_ctx *si);
loff_t sparse_image_size(struct sparse_image_ctx *si);