mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 01:42:29 +00:00
fix(ida): fixed export crash on IDA 9.0
This commit is contained in:
parent
44d8ba3c75
commit
e591b8b17d
1 changed files with 6 additions and 8 deletions
|
|
@ -22,12 +22,7 @@ static bna_save_function_symbols(fd) {
|
||||||
"%s %s f end=%s ; %08X",
|
"%s %s f end=%s ; %08X",
|
||||||
func_name, bna_format_address(func_start), bna_format_address(func_end), get_func_attr(func_address, FUNCATTR_FLAGS));
|
func_name, bna_format_address(func_start), bna_format_address(func_end), get_func_attr(func_address, FUNCATTR_FLAGS));
|
||||||
|
|
||||||
if (writestr(fd, func_line) != 0) {
|
if (fprintf(fd, "%s\n", func_line) != 0) {
|
||||||
error("bna_save_function_symbols: failed to write line to file");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (writestr(fd, "\n") != 0) {
|
|
||||||
error("bna_save_function_symbols: failed to write line break to file");
|
error("bna_save_function_symbols: failed to write line break to file");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -49,10 +44,10 @@ static main() {
|
||||||
output_filename = ask_file(1, "all.sym", "Enter a path to export your symbols");
|
output_filename = ask_file(1, "all.sym", "Enter a path to export your symbols");
|
||||||
if (output_filename == 0) {
|
if (output_filename == 0) {
|
||||||
error("No output file specified. Doing NOTHING.");
|
error("No output file specified. Doing NOTHING.");
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
output_file = fopen(output_filename, "wb");
|
output_file = fopen(output_filename, "w");
|
||||||
|
|
||||||
if (!output_file) {
|
if (!output_file) {
|
||||||
error("Failed to open output file '%s' for writing", output_filename);
|
error("Failed to open output file '%s' for writing", output_filename);
|
||||||
|
|
@ -68,5 +63,8 @@ static main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(output_file);
|
fclose(output_file);
|
||||||
|
|
||||||
|
warning("Successfully exported to %s", output_filename);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue