]> PatchyGit - patchyircd.git/commitdiff
fix use-after-free with jobs
authorEgor <egor@patchysicp.xyz>
Fri, 28 Jun 2024 18:40:05 +0000 (21:40 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 28 Jun 2024 18:40:05 +0000 (21:40 +0300)
src/job.c

index ea043c1..4f1541b 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -63,6 +63,7 @@ static void job_process(void)
                        memset(jobtab[0].data, 0, jobtab[0].len);
                        free(jobtab[0].data);
                        jobtab[0].data = 0;
+                       jobtab[0].len = 0;
                        jobtab[0].job = 0;
                }
        }