Closed aar0nge closed 4 years ago
send a PR with the suggested fix please
On 25 Mar 2020, at 07:56, aar0nge notifications@github.com wrote:
Work environment
Questions Answers OS/arch/bits (mandatory) Ubuntu x86 64 File format of the file you reverse (mandatory) ELF Architecture/bits of the file (mandatory) x86/64 r2 -v full output, not truncated (mandatory) rradare2 4.3.1 23909 @ linux-x86-64 git.4.3.1-1-ge55661b commit: e55661b https://github.com/radareorg/radare2/commit/e55661bd4c229b9095982675709bdd52e1b4c068 build: 2020-03-22__22:18:20 Expected behavior
Handle input error
Actual behavior
seg fault
Steps to reproduce the behavior
$ r2 - [0x00000000]> radiff2 Usage: radiff2 [-abBcCdjrspOxuUvV] [-A[A]] [-g sym] [-m graph_mode][-t %] [file] [file] [0x00000000]> radiff2 Segmentation fault (core dumped)
Additional Logs, screenshots, source-code, configuration dump, ...
https://user-images.githubusercontent.com/20163299/77509693-299df400-6ea8-11ea-945c-b3bd8febfabd.png not sure about the root cause, seems like the situation here: http://www.cplusplus.com/forum/unices/104742/ http://www.cplusplus.com/forum/unices/104742/ about getopt's usage
suggestion fix:
add extern int optind; optind = 1; before the getopt while loop in radiff2.c: r_main_radiff2()
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radareorg/radare2/issues/16306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG75FR2KVPRLDTQLWZRBBLRJGTKBANCNFSM4LTHI62A.
Work environment
Expected behavior
Handle input error
Actual behavior
seg fault
Steps to reproduce the behavior
$ r2 - [0x00000000]> radiff2 Usage: radiff2 [-abBcCdjrspOxuUvV] [-A[A]] [-g sym] [-m graph_mode][-t %] [file] [file] [0x00000000]> radiff2 Segmentation fault (core dumped)
Additional Logs, screenshots, source-code, configuration dump, ...
not sure about the root cause, seems like the situation here: http://www.cplusplus.com/forum/unices/104742/ about
getopt
's usagesuggestion fix:
add
extern int optind; optind = 1;
before thegetopt
while loopin radiff2.c: r_main_radiff2()