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