What changed, and why it matters
This commit fixes a macro definition for a memory-allocation helper. The macro was accidentally written to take only one argument ('size') even though the underlying function it calls needs two arguments ('number of items' and 'size of each item'). Any code using this macro would fail to compile, or if it somehow compiled, would pass wrong arguments. The fix makes the macro accept both required arguments, matching the function it wraps. There is no direct evidence in the commit of a security vulnerability being exploited.
Treat as a normal bug fix. Verify that no call sites in current or recent branches used the one-argument form in a way that compiled (e.g., via token pasting or variadic misuse). If all call sites already use the corrected two-argument form, no further security response is needed. Include this fix in the next release.
Security signals we found
Memory-allocation wrapper macro arity mismatch fixed
Potential for undefined behavior if mismatched macro were used
No explicit security claim or CVE referenced in commit
Evidence from the diff
In main/utils/malloc_ext.h, the JADE_CALLOC_DRAM macro was defined as JADE_CALLOC_DRAM(size) but calls jade_calloc_dram(file, line, num, size), which expects a num parameter. The patch changes the macro signature to JADE_CALLOC_DRAM(num, size). This is a straightforward API-signature bug fix. Because the macro arity did not match the call site arity, any use of JADE_CALLOC_DRAM would have been a compile-time error; therefore this is unlikely to have been reachable in a shipping build. The fix removes a potential source of undefined behavior or build breakage but does not, by itself, demonstrate an exploitable memory-safety flaw.
Changed components
main/utils/malloc_ext.hJADE_CALLOC_DRAM macrojade_calloc_dram allocator wrapperInspect captured patch +1 / −1
### main/utils/malloc_ext.h
@@ -78,7 +78,7 @@ static inline void* jade_calloc(const char* file, const int line, const size_t n
jade_malloc_spiram_aligned(__FILE_NAME__, __LINE__, size, alignment)
#define JADE_CALLOC_PREFER_SPIRAM(num, size) jade_calloc_prefer_spiram(__FILE_NAME__, __LINE__, num, size)
#define JADE_MALLOC_DRAM(size) jade_malloc_dram(__FILE_NAME__, __LINE__, size)
-#define JADE_CALLOC_DRAM(size) jade_calloc_dram(__FILE_NAME__, __LINE__, size)
+#define JADE_CALLOC_DRAM(num, size) jade_calloc_dram(__FILE_NAME__, __LINE__, num, size)
#define JADE_MALLOC_PREFER_DRAM(size) jade_malloc_prefer_dram(__FILE_NAME__, __LINE__, size)
#endif /* UTILS_MALLOC_EXT_H_ */Why this scored 32/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.