Changeset: 530601727b61 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/530601727b61
Modified Files:
geom/monetdb5/geom.c
Branch: Dec2025
Log Message:
Initialize len field before accessing data field.
This makes the undefined sanitizer happy.
diffs (21 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2577,6 +2577,8 @@ wkbFromBinaryWithBuffer(allocator *ma, w
}
//compute the value for s
+ w->len = (int) wkbLength;
+ w->srid = 0;
for (i = 0; i < strLength; i += 2) {
int firstHalf = decit((*inStr)[i]);
int secondHalf = decit((*inStr)[i + 1]);
@@ -2586,8 +2588,6 @@ wkbFromBinaryWithBuffer(allocator *ma, w
w->data[i / 2] = (firstHalf << 4) | secondHalf;
}
- w->len = (int) wkbLength;
- w->srid = 0;
return MAL_SUCCEED;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]