diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 09:45:56 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 09:45:56 -0700 |
| commit | c5c3fa193937b26611db72f925102cb22c8797b4 (patch) | |
| tree | bc894bbb7f31465e75e8c02c8191ff4ba84dc8c7 /tools | |
| parent | 8e23410a7a95f36613fb16539d1796df7aad145d (diff) | |
| parent | 337076f9ba9222bb29f49fb5b168d8865a8a95a2 (diff) | |
| download | mruby-c5c3fa193937b26611db72f925102cb22c8797b4.tar.gz mruby-c5c3fa193937b26611db72f925102cb22c8797b4.zip | |
Merge pull request #1164 from h2so5/add-validation-for-c-symbol
Add validation for C language symbol name
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrbc/mrbc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 8698086ff..2736197c8 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -215,6 +215,10 @@ main(int argc, char **argv) } if (args.initname) { n = mrb_dump_irep_cfunc(mrb, n, args.debug_info, args.wfp, args.initname); + if (n == MRB_DUMP_INVALID_ARGUMENT) { + printf("%s: Invalid C language symbol name\n", args.initname); + return EXIT_FAILURE; + } } else { n = mrb_dump_irep_binary(mrb, n, args.debug_info, args.wfp); |
