mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
9 lines
183 B
C
9 lines
183 B
C
|
|
#include <stdio.h>
|
||
|
|
|
||
|
|
void use_after_close_bug() {
|
||
|
|
FILE *f = fopen("data.txt", "r");
|
||
|
|
fclose(f);
|
||
|
|
char buf[256];
|
||
|
|
fread(buf, 1, sizeof(buf), f); // BUG: use after close
|
||
|
|
}
|