Changeset: 5d86dd7a7073 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5d86dd7a7073
Modified Files:
        monetdb5/mal/mal_parser.c
Branch: Dec2025
Log Message:

Catch if atom type names ever go behond 13 characters. GH #7962.


diffs (27 lines):

diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -1303,8 +1303,10 @@ argument(Client ctx, mel_func *curFunc, 
                if (type < 0)
                        return -1;
                int tt = getBatType(type);
-               if (tt != TYPE_any)
+               if (tt != TYPE_any) {
+                       assert(strlen(BATatoms[tt].name) < 14);
             strcpy(curArg->type, BATatoms[tt].name);
+               }
                if (isaBatType(type))
                        curArg->isbat = true;
                if (isPolymorphic(type)) {
@@ -1316,8 +1318,10 @@ argument(Client ctx, mel_func *curFunc, 
        } else if (currChar(ctx) == ':') {
                type = typeElm(ctx, TYPE_any);
                int tt = getBatType(type);
-               if (tt != TYPE_any)
+               if (tt != TYPE_any) {
+                       assert(strlen(BATatoms[tt].name) < 14);
             strcpy(curArg->type, BATatoms[tt].name);
+               }
                if (isaBatType(type))
                        curArg->isbat = true;
                if (isPolymorphic(type)) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to