Skip to content
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

image_info output can cause issues with Bash (ESPTOOL-999) #1057

Open
KaeLL opened this issue Jan 23, 2025 · 1 comment
Open

image_info output can cause issues with Bash (ESPTOOL-999) #1057

KaeLL opened this issue Jan 23, 2025 · 1 comment

Comments

@KaeLL
Copy link

KaeLL commented Jan 23, 2025

Operating System

Linux

Esptool Version

4.9.dev4

Python Version

Python 3.13.1

Full Esptool Command Line that Was Run

VAR=$(esptool.py image_info -v 2 build/app.bin | tr '\0' '?')

Esptool Output

...
Application information
=======================
Project name: app??????????
App version: 1.2.3???????????????????????????
Compile time: Jan 17 2025????? 14:43:46????????
...

What is the Expected Behaviour?

The output from the binary header should be sanitized because Bash doesn't handle NUL bytes particularly well in strings, variables, and it can cause problems for scripts.
In this case, Bash complains: bash: warning: command substitution: ignored null byte in input

More Information

No response

Other Steps to Reproduce

No response

@github-actions github-actions bot changed the title image_info output can cause issues with Bash image_info output can cause issues with Bash (ESPTOOL-999) Jan 23, 2025
@radimkarnis
Copy link
Collaborator

Hello @KaeLL,
thanks for the report!

We'll sanitize the app info and bootloader desc.

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

No branches or pull requests

2 participants