truncate: always set mode when opening file to avoid fortify errors
No binary (build failed)
—
(log yok)
| @@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv) | |
| argv += optind; | |
| while (*argv) { | |
| - | int fd = open(*argv, flags); |
| + | int fd = open(*argv, flags, 0666); |
| if (fd < 0) { | |
| if (errno != ENOENT || !(opts & OPT_NOCREATE)) { | |
| bb_perror_msg("%s: open", *argv); | |