mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-4797 corrected thread safety issue with EnumDataType.getNames method
This commit is contained in:
parent
649c1829f8
commit
1d641f5197
2 changed files with 6 additions and 5 deletions
|
@ -164,7 +164,7 @@ public class PEx64UnwindInfoDataType extends DynamicDataType {
|
||||||
|
|
||||||
private static EnumDataType unwindInfoFlagsEnum;
|
private static EnumDataType unwindInfoFlagsEnum;
|
||||||
|
|
||||||
private EnumDataType defineUnwindInfoFlags() {
|
private synchronized EnumDataType defineUnwindInfoFlags() {
|
||||||
if (unwindInfoFlagsEnum == null) {
|
if (unwindInfoFlagsEnum == null) {
|
||||||
unwindInfoFlagsEnum = new EnumDataType("UNW_FLAGS", 1);
|
unwindInfoFlagsEnum = new EnumDataType("UNW_FLAGS", 1);
|
||||||
unwindInfoFlagsEnum.add("UNW_FLAG_NHANDLER", PEx64UnwindInfo.UNW_FLAG_NHANDLER);
|
unwindInfoFlagsEnum.add("UNW_FLAG_NHANDLER", PEx64UnwindInfo.UNW_FLAG_NHANDLER);
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class EnumDataType extends GenericDataType implements Enum {
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
Collection<List<String>> values = valueMap.values();
|
Collection<List<String>> values = valueMap.values();
|
||||||
for (List<String> list : values) {
|
for (List<String> list : values) {
|
||||||
|
list = new ArrayList<>(list);
|
||||||
Collections.sort(list);
|
Collections.sort(list);
|
||||||
names.addAll(list);
|
names.addAll(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue