mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
- added assertion to catch configurations that would lead to buffer overrun
reading anchors;
This commit is contained in:
parent
6cce3f1b47
commit
8fa0c20d80
@ -332,6 +332,7 @@ layer parse_yolo(list *options, size_params params)
|
||||
for(i = 0; i < len; ++i){
|
||||
if (a[i] == ',') ++n;
|
||||
}
|
||||
assert(n <= total*2);
|
||||
for(i = 0; i < n; ++i){
|
||||
float bias = atof(a);
|
||||
l.biases[i] = bias;
|
||||
|
Loading…
Reference in New Issue
Block a user