huntr.dev | the place to protect open source
Anon-Artist
Jamie Slome
commited on
Security Fix for Arbitrary Code Execution - huntr.dev (#1962)
Browse filesCo-authored-by: Anon-Artist <[email protected]>
Co-authored-by: Jamie Slome <[email protected]>
train.py
CHANGED
@@ -59,7 +59,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
|
|
59 |
cuda = device.type != 'cpu'
|
60 |
init_seeds(2 + rank)
|
61 |
with open(opt.data) as f:
|
62 |
-
data_dict = yaml.load(f, Loader=yaml.
|
63 |
with torch_distributed_zero_first(rank):
|
64 |
check_dataset(data_dict) # check
|
65 |
train_path = data_dict['train']
|
|
|
59 |
cuda = device.type != 'cpu'
|
60 |
init_seeds(2 + rank)
|
61 |
with open(opt.data) as f:
|
62 |
+
data_dict = yaml.load(f, Loader=yaml.SafeLoader) # data dict
|
63 |
with torch_distributed_zero_first(rank):
|
64 |
check_dataset(data_dict) # check
|
65 |
train_path = data_dict['train']
|