diff options
-rw-r--r-- | ubi-utils/libubigen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ubi-utils/libubigen.c b/ubi-utils/libubigen.c index 9eaa7f5..d2a949b 100644 --- a/ubi-utils/libubigen.c +++ b/ubi-utils/libubigen.c @@ -279,7 +279,7 @@ int ubigen_write_layout_vol(const struct ubigen_info *ui, int peb1, int peb2, memset(outbuf + ui->data_offs + ui->vtbl_size, 0xFF, ui->peb_size - ui->data_offs - ui->vtbl_size); - seek = peb1 * ui->peb_size; + seek = (off_t) peb1 * ui->peb_size; if (lseek(fd, seek, SEEK_SET) != seek) { sys_errmsg("cannot seek output file"); goto out_free; @@ -293,7 +293,7 @@ int ubigen_write_layout_vol(const struct ubigen_info *ui, int peb1, int peb2, goto out_free; } - seek = peb2 * ui->peb_size; + seek = (off_t) peb2 * ui->peb_size; if (lseek(fd, seek, SEEK_SET) != seek) { sys_errmsg("cannot seek output file"); goto out_free; |