T: bugfix: check limits

This commit is contained in:
Cedric Roux
2024-09-06 16:38:15 +02:00
parent 69a84825fb
commit 1e645c514f
+6
View File
@@ -71,6 +71,12 @@ event new_event(int type, int length, char *buffer, void *database)
e.buffer = buffer;
f = get_format(database, type);
if (f.count > T_MAX_ARGS) {
printf("fatal: the T trace %s is defined to take %d arguments, but T_MAX_ARGS is %d. "
"Increase T_MAX_ARGS in event.h and recompile all the tracers (make clean; make).\n",
event_name_from_id(database, type), f.count, T_MAX_ARGS);
exit(1);
}
e.ecount = f.count;