Skip to content

utarfile: invalid syntax for integer with base 8 #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AuHau opened this issue Jun 17, 2023 · 1 comment
Closed

utarfile: invalid syntax for integer with base 8 #684

AuHau opened this issue Jun 17, 2023 · 1 comment

Comments

@AuHau
Copy link

AuHau commented Jun 17, 2023

I am using OTA library that I have tweaked to get my firmware from Github Release Assets, which are packed into Tar file (tar -czf source.tar.gz *) using Github Workflow.

The new firmware is downloaded to the flash correctly but when it is about to be extracted, it fails with error: invalid syntax for integer with base 8 coming from extracting the file's size in utarfile.

I have printed the byte arrays of the h.size and got: bytearray(b'00000002264 \x00').
Then I tried to repack the tar on my Mac and reuploaded that to the device and suddenly all works, but noticed that the printed byte array of size is: bytearray(b'00000002264 '). Eq. \x00 is missing.

In the Github Actions it is packed on Ubuntu machine. Maybe there should be some sanitation of the bytearray?

@dpgeorge
Copy link
Member

Thanks for the report. Indeed utarfile reading is broken! It was broken by 7128d42

Should be fixed by 0a5b635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants