From 13167be05c7ac646d4de71b229a3457f04d2846f Mon Sep 17 00:00:00 2001 From: oaq Date: Thu, 9 Jul 2026 18:53:51 +1000 Subject: [PATCH] rinex: readrnxobs -1 on malloc err --- src/rinex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rinex.c b/src/rinex.c index 4b3beea7f..9bb39ebca 100644 --- a/src/rinex.c +++ b/src/rinex.c @@ -1141,7 +1141,7 @@ static int readrnxobs(FILE *fp, gtime_t ts, gtime_t te, double tint, if (!obs||rcv>MAXRCV) return 0; - if (!(data=(obsd_t *)malloc(sizeof(obsd_t)*MAXOBS))) return 0; + if (!(data=(obsd_t *)malloc(sizeof(obsd_t)*MAXOBS))) return -1; /* read RINEX observation data body */ while ((n=readrnxobsb(fp,opt,ver,tsys,tobs,&flag,data,sta))>=0&&stat>=0) {