From 211fad5453496a4d4d8354af70b3311c61e14459 Mon Sep 17 00:00:00 2001 From: Martin Uecker Date: Thu, 22 Aug 2024 21:38:48 +0200 Subject: [PATCH] minor fixes --- src/box.c | 2 +- src/classifier.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/box.c b/src/box.c index a0a53586f2c..f39cc0ba394 100644 --- a/src/box.c +++ b/src/box.c @@ -152,7 +152,7 @@ float box_iou_kind(box a, box b, IOU_LOSS iou_kind) { //IOU, GIOU, MSE, DIOU, CIOU switch(iou_kind) { - case MSE: assert(0); + case MSE: assert(0); case IOU: return box_iou(a, b); case GIOU: return box_giou(a, b); case DIOU: return box_diou(a, b); diff --git a/src/classifier.c b/src/classifier.c index 4b74816bd93..4908bed97b4 100644 --- a/src/classifier.c +++ b/src/classifier.c @@ -768,7 +768,7 @@ void try_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filena char *input = buff; while(1){ if(filename){ - strncpy(input, filename, 255); + strncpy(input, filename, sizeof buff - 1); }else{ printf("Enter Image Path: "); fflush(stdout);