From fdbc064427b4fda0436def554b72419b80e1fe2e Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Wed, 1 Jul 2026 21:40:52 +0300 Subject: [PATCH] photosyst: fix read uninit dist if bypass fgets() MISRA C:2023 9.1 9.1 The value of an object with an automatic storage time should not be read before it has been set. Reference: https://www.mathworks.com/help/bugfinder/ref/misrac2023rule9.1.html --- photosyst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/photosyst.c b/photosyst.c index 08654c6f..02ca79c7 100644 --- a/photosyst.c +++ b/photosyst.c @@ -2698,7 +2698,7 @@ void realnuma_support(void) { FILE *fp; - int i, total, nr=0, dist[10]; + int i, total, nr=0, dist[10]={0}; char linebuf[1024]; if ( (fp = fopen(NUMADISTANCE0, "r")) == NULL)