Project

General

Profile

Bug #1147 » musl-ro-write.c

Dan Fandrich, 02 Jan 2016 08:07

 
1
#include <stdio.h>
2

    
3
int main(void)
4
{
5
    FILE *fp = fopen("ro.txt","a");
6
    if (fp) {
7
        printf("Error, should not be open\n");
8
        fprintf(fp, "How can this be written to a read only file?\n");
9
        fclose(fp);
10
    }
11
    return 0;
12
}
(2-2/2)