Skip to content

Commit

Permalink
Fix null dereference on tmpfile error (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfusik authored Aug 16, 2024
1 parent 965328c commit 873b288
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mos-platform/common/c/stdio-full.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ FILE *tmpfile(void) {
char name[L_tmpnam];
tmpnam(name);
FILE *f = fopen(name, "wb+");
f->status |= DELONCLOSE;
if (f)
f->status |= DELONCLOSE;
return f;
}

Expand Down

0 comments on commit 873b288

Please sign in to comment.