Skip to content

fix: error when using fseek on 32-bit system

Stefano babic requested to merge github/fork/rty813/bugfix/fseek into master

Created by: rty813

When running on an armhf system, if the basefile size exceeds the maximum value of uin32, the program will report an error: Error seeking rdiff base file: Invalid argument

full log:

[TRACE] : SWUPDATE running :  [rdiff_log] : swupdate: (rs_patch_s_copying) copy 2048 bytes from basis at offset 2343264256
[ERROR] : SWUPDATE failed [0] ERROR rdiff_handler.c : base_file_read_cb : 75 : Error seeking rdiff base file: Invalid argument
[ERROR] : SWUPDATE running :  [rdiff_log] : swupdate: ERROR: (rs_job_complete) patch job failed: IO error
[ERROR] : SWUPDATE failed [0] ERROR rdiff_handler.c : apply_rdiff_chunk_cb : 202 : Error processing rdiff chunk: IO error
[ERROR] : SWUPDATE failed [0] ERROR rdiff_handler.c : apply_rdiff_patch : 353 : Error -28 running rdiff job, aborting.
[TRACE] : SWUPDATE running :  [install_single_image] : Installer for rdiff_image not successful !
[ERROR] : SWUPDATE failed [1] Installation failed !

Merge request reports