diff options
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r-- | libcpp/directives.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c index a835b68..fe1867d 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -668,6 +668,14 @@ do_include_common (cpp_reader *pfile, enum include_type type) if (!fname) return; + if (!*fname) + { + cpp_error (pfile, CPP_DL_ERROR, "empty filename in #%s", + pfile->directive->name); + free ((void *) fname); + return; + } + /* Prevent #include recursion. */ if (pfile->line_table->depth >= CPP_STACK_MAX) cpp_error (pfile, CPP_DL_ERROR, "#include nested too deeply"); |