This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB354145: Fix potential UB when target_file directory is
null (authored by stefan.graenitz, committed by ).
Herald added a project: LLDB.
Changed prior to commit:
https://reviews.llvm.org/D57964?vs=186
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.
That code seems amazingly good to me ;-)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57964/new/
https://reviews.llvm.org/D57964
___
sgraenitz added a comment.
Herald added a subscriber: jdoerfert.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57964/new/
https://reviews.llvm.org/D57964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/
sgraenitz updated this revision to Diff 186224.
sgraenitz added a comment.
Polish && error out also on empty string
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57964/new/
https://reviews.llvm.org/D57964
Files:
source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
In
jingham added a comment.
Might be clearer to do:
if (target_file.GetDirectory().IsEmpty()) {
error...
}
std::string directory = ...
Avoids the extra variable and also adds the check for "", which I don't think
we want to add to sys.path either.
CHANGES SINCE LAST ACTION
https://
sgraenitz updated this revision to Diff 186002.
sgraenitz added a comment.
Remove useless newline
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57964/new/
https://reviews.llvm.org/D57964
Files:
source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Index: source/Plugin
sgraenitz created this revision.
sgraenitz added a reviewer: jingham.
As seen in a crash report, the C-string returned for the directory component of
`target_file` can null. It should not be assigned to `std::string` directly as
this is undefined behavior.
https://reviews.llvm.org/D57964
File