projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2603a52
)
Fix out-of-bounds read in OSX disk checking (#2658).
author
Carl Hetherington
<cth@carlh.net>
Sun, 19 Nov 2023 20:07:25 +0000
(21:07 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 19 Nov 2023 20:07:25 +0000
(21:07 +0100)
src/lib/cross_common.cc
patch
|
blob
|
history
diff --git
a/src/lib/cross_common.cc
b/src/lib/cross_common.cc
index e8c209b21e098f8da981bd5676af55c0c00b65ab..b4d322096a5645f3bf7f7fd5c09d40f94279b3ef 100644
(file)
--- a/
src/lib/cross_common.cc
+++ b/
src/lib/cross_common.cc
@@
-172,7
+172,7
@@
osx_disks_to_drives (vector<OSXDisk> disks)
continue;
}
for (auto& j: disks) {
- if (!j.mount_points.empty() && starts_with(j.device, i.device)) {
+ if (
&i != &j &&
!j.mount_points.empty() && starts_with(j.device, i.device)) {
LOG_DISK("Marking %1 as mounted because %2 is", i.device, j.device);
std::copy(j.mount_points.begin(), j.mount_points.end(), back_inserter(i.mount_points));
}