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

silx.io.specfile: Fixed buffer overflow for too long motor or label #3622

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

t20100
Copy link
Member

@t20100 t20100 commented May 16, 2022

This PR makes the temporary buffer larger (256 chars) and cuts the string in case of overflow.
There is certainly a better way to fix this by copying directly the right part of buf into the newly allocated onelabel buffer and avoiding the use of a temporary buffer, but it involves more code changes.

closes #3621

@t20100 t20100 added this to the Next release milestone May 16, 2022
@t20100 t20100 requested a review from vasole May 16, 2022 08:19
@vasole
Copy link
Member

vasole commented May 16, 2022

I wonder if SPEC itself allows to have a label of more than 40 characters.

@t20100
Copy link
Member Author

t20100 commented May 17, 2022

Provided this issue is there since "ever", I would say no, but from a very quick look at the documentation I could not find something about it.

@vasole vasole merged commit 809420f into silx-kit:master Jun 9, 2022
@t20100 t20100 deleted the fix-spec branch August 22, 2022 09:30
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 this pull request may close these issues.

specfile: is a label limited to 40 characters in windows?
2 participants