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

config starting with a line of only hashes causes segfault #98

Closed
oberon-manjaro opened this issue May 31, 2017 · 4 comments
Closed

config starting with a line of only hashes causes segfault #98

oberon-manjaro opened this issue May 31, 2017 · 4 comments
Milestone

Comments

@oberon-manjaro
Copy link

As discussed here
since libconfuse v3.1 a config file for i3status starting with a line of hashes only causes libconfuse to segfault:

(gdb) run
Starting program: /usr/bin/i3status 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007f6c787485da in ?? () from /usr/lib/libconfuse.so.1
(gdb) bt
#0  0x00007f6c787485da in ?? () from /usr/lib/libconfuse.so.1
#1  0x00007f6c787493fb in cfg_yylex () from /usr/lib/libconfuse.so.1
#2  0x00007f6c78746ac8 in ?? () from /usr/lib/libconfuse.so.1
#3  0x00007f6c78747359 in cfg_parse_fp () from /usr/lib/libconfuse.so.1
#4  0x00007f6c78747428 in cfg_parse () from /usr/lib/libconfuse.so.1
#5  0x00000000004057d9 in main ()
(gdb)
@troglobit
Copy link
Collaborator

Nice catch, and thank you for reporting it!

I'll add a unit test to reproduce and start working on a fix right away.

@oberon-manjaro
Copy link
Author

Sounds great! Thank you :)

troglobit added a commit to troglobit/libconfuse that referenced this issue May 31, 2017
As mentioned in issue libconfuse#98, a line of only hashes (only comment chars)
cause libConfuse v3.1 to segfault.  This patch extends with hashes,
double-slashes and /*****************************/

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
troglobit added a commit that referenced this issue May 31, 2017
@troglobit
Copy link
Collaborator

Found and fixed. Will release a new libConfuse as soon as possible, at the latest during the coming weekend.

Thank you again for reporting.

@troglobit
Copy link
Collaborator

libConfuse v2.3 released now ... https://github.com/martinh/libconfuse/releases/tag/v3.2

@troglobit troglobit added this to the v3.2 milestone Aug 15, 2017
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

No branches or pull requests

2 participants