File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2401,6 +2401,10 @@ graph_txt_page(FILE *fo, void (*graph_fun)(GraphDisplay *))
24012401 char *outfile;
24022402 if (swill_getargs (" i(output)s(outfile)" , &output, &outfile) && output && strlen (outfile)) {
24032403 FILE *ofile = fopen (outfile, " w+" );
2404+ if (ofile == NULL ) {
2405+ html_perror (fo, " Unable to open " + string (outfile) + " for writing" );
2406+ return 0 ;
2407+ }
24042408 GDTxt gdout (ofile);
24052409 graph_fun (&gdout);
24062410 fclose (ofile);
@@ -2505,6 +2509,10 @@ produce_call_graphs(const vector <string> &call_graphs)
25052509 }
25062510
25072511 FILE *target = fopen (split_base_and_opts[0 ].c_str () , " w+" );
2512+ if (target == NULL ) {
2513+ perror (split_base_and_opts[0 ].c_str ());
2514+ continue ;
2515+ }
25082516 string base = split_base_and_opts[0 ];
25092517 GDTxt gd (target);
25102518 // Disable swill
You can’t perform that action at this time.
0 commit comments