mirror of
https://github.com/Harshit-Dhanwalkar/AsciiCam.git
synced 2026-06-09 10:25:12 +02:00
fix: V-002 security vulnerability
Automated security fix generated by OrbisAI Security
This commit is contained in:
parent
d87bdfc917
commit
89262dafca
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,9 @@ static void do_edge_boost(uint8_t *gray, int w, int h, void *ctx) {
|
|||
int strength = ctx ? *(int *)ctx : 128;
|
||||
|
||||
// Unsharp mask: sharpened = original + (original - blurred) * strength
|
||||
uint8_t *tmp = malloc(w * h);
|
||||
if (h <= 0 || w <= 0)
|
||||
return;
|
||||
uint8_t *tmp = calloc((size_t)w, (size_t)h);
|
||||
if (!tmp)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue