Ticket #86 (new defect)

Opened 4 years ago

Last modified 4 years ago

wminput crashes if config file doesn't end with newline

Reported by: hlinnaka Owned by: dsmith
Priority: minor Milestone:
Component: wminput Version: 0.6.00
Keywords: Cc:

Description

wminput segfaults if the config file doesn't have a newline at the end. conf_pop_config() sets current_config_filename to an invalid value when EOF of the config file is reached (accesses config_filename_stack[-1]). Attached patch fixes that.

Attachments

fix-no-EOL-at-EOF.patch Download (0.7 KB) - added by hlinnaka 4 years ago.
Patch to fix this bug

Change History

Changed 4 years ago by hlinnaka

Patch to fix this bug

Changed 4 years ago by dsmith

This looks strange - you're pulling yyloc out of the array after index is decremented rather than before. Can you attach an example config file that doesn't work without your patch, but does work with it?

Note: See TracTickets for help on using tickets.