add protection agains big vla

This commit is contained in:
hugogogo
2026-05-26 15:25:41 +02:00
parent 487191c516
commit 858d4f3ac8
3 changed files with 10 additions and 10 deletions

View File

@@ -13,9 +13,9 @@
*/
#define DOUBLE_PRECISION 0.00001
// maximum exponent supported to avoid excessive variable-length stack allocation (VLA),
// maximum size supported to avoid excessive variable-length stack allocation (VLA),
// which can lead to stack overflows, segmentation faults, and potential denial-of-service (DoS)
#define MAX_EXPONENT 1024
#define MAX_VLA_SIZE 1024
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* MAIN.C