Skip to content
Snippets Groups Projects
Commit 66dde65f authored by Rohit Gupta's avatar Rohit Gupta
Browse files

added a new check for illegal file permissions to mbmssim.c, to avoid a...

added a new check for illegal file permissions to mbmssim.c, to avoid a segfault if permissions are invalid.
parent 632204bb
No related branches found
No related tags found
No related merge requests found
......@@ -337,7 +337,11 @@ int main(int argc, char **argv)
else
sprintf(fname,"embms_awgn_%d_%d.m",mcs,N_RB_DL);
fd = fopen(fname,"w");
if (!(fd = fopen(fname,"w"))) {
printf("Cannot open %s, check permissions\n",fname);
exit(-1);
}
if (awgn_flag==0)
fprintf(fd,"SNR_%d_%d=[];errs_mch_%d_%d=[];mch_trials_%d_%d=[];\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment