Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix config file parsing on musl libc
On the musl libc, autorun, layout and workspace name settings were always rejected as invalid. As it turns out, parsing those was relying on sscanf incorrectly matching %Nc as long as there is at least one character. This is fixed by matching only the initial part of the string via sscanf and skipping ahead by the amount of bytes consumed. This also avoids unnecessary zeroing, copying and possible implicit truncation. Relevant glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12701
- Loading branch information
Showing
1 changed file
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters