NLnetLabs / simdzone

Fast and standards compliant DNS zone parser
BSD 3-Clause "New" or "Revised" License
60 stars 10 forks source link

`open_file` always incorrectly opens stdin on `-` #212

Closed k0ekk0ek closed 2 days ago

k0ekk0ek commented 2 weeks ago

205 added reading from stdin if the initial filename is -. However, it does so in open_file and so if $INCLUDE - is encountered it will also read from stdin in that scenario, which is incorrect. We'll also have to check if stdin is closed when parsing is complete because it probably shouldn't do that either (we didn't open the handle, so we shouldn't close it either).

wcawijngaards commented 2 weeks ago

https://github.com/NLnetLabs/simdzone/pull/208/commits/dc65a06c9161d385e6bc50b66ede018426b1eec3 commits a fix for the problem. I guess a merge of #208 would then fix this one.

k0ekk0ek commented 2 weeks ago

Haven't looked at the PR yet, but I encountered it in fixing Solaris issues, so thought I'd write it down. A quick scan indeed suggests the problem would be fixed :+1:

k0ekk0ek commented 2 days ago

Closed via #208.