huntr.dev | the place to protect open source
Anon-Artist
Jamie Slome
commited on
Commit
•
b5d851d
1
Parent(s):
18c2588
Security Fix for Arbitrary Code Execution - huntr.dev (#1962)
Browse filesCo-authored-by: Anon-Artist <61599526+Anon-Artist@users.noreply.github.com>
Co-authored-by: Jamie Slome <jamie@418sec.com>
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']
|