-
Notifications
You must be signed in to change notification settings - Fork 282
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
fix: SIGSEGV on parsing of config file. #1783
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1783 +/- ##
==========================================
+ Coverage 67.48% 68.22% +0.73%
==========================================
Files 151 151
Lines 20805 20848 +43
==========================================
+ Hits 14041 14223 +182
+ Misses 6764 6625 -139
Continue to review full report at Codecov.
|
Makes sense. |
Interesting. I guess this is because |
@kevinbackhouse yep that's it. But on top of that, I'm not really a fan of having this library just dropped into our source like this and then even applying clang-tidy to it. One could consider replacing it with something else but let's leave that discussion to #1515 |
@hassec: Oh, I see. All of this code, including that |
I think I would prefer if the test didn't write a file into the user's home directory. One suggestion is to get |
I kind of understand that point. But the test is set up in a way such that it can't overwrite a preexisting file, and it removes the file it creates at the end.
if you have strong feelings against the current solution, I'd say the |
The main reason why I don't like it is that it could make Exiv2 look like a malicious repo. People are quite worried about supply-chain attacks these days, so a build or test script that modifies files outside its own directory could raise suspicions. |
@kevinbackhouse fair enough! Let me have a look at adding a |
Another option that might be relatively quick to implement would be to check the current directory for a file named |
6f38f22
to
a1c9d06
Compare
@kevinbackhouse I've implemented the current working directory version because it seemed more straight forward. Turns out adding the option to the exiv2 app isn't hard but then one has to think about how to properly pass those forward to the library part of exiv2, and then also expose this setting to the library users. That would have been more work so I went with your suggestion 😉 Also, thanks for reviewing!! 👍 |
This reverts a bug that was introduced by the
clang-tidy
change in #1659. (fyi @neheb)I'm just opening this already to make people aware of it.
Before merging, I'd like to add a test that uses a config file, as it's a bit of a shame we hadn't noticed this.