From 8fa0c20d800f85004d776fff2800c719b4f80ba5 Mon Sep 17 00:00:00 2001 From: Juan Altmayer Pizzorno Date: Wed, 15 Apr 2020 14:33:37 -0400 Subject: [PATCH] - added assertion to catch configurations that would lead to buffer overrun reading anchors; --- src/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser.c b/src/parser.c index c8141c9f..61e132a0 100644 --- a/src/parser.c +++ b/src/parser.c @@ -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;