- added assertion to catch configurations that would lead to buffer overrun

reading anchors;
This commit is contained in:
Juan Altmayer Pizzorno 2020-04-15 14:33:37 -04:00
parent 6cce3f1b47
commit 8fa0c20d80

View File

@ -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;