Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ 123 mumsh $ parse_cmd.c:137:26: runtime error: unsigned integer overflow: 0 - 2 cannot be represented in type 'unsigned long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior parse_cmd.c:137:26 in parse_cmd.c:137:8: runtime error: addition of unsigned offset to 0x7ffc5f95a800 overflowed to 0x7ffc5f95a7fe SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior parse_cmd.c:137:8 in ================================================================= ==4574==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffc5f95a7fe at pc 0x00000051b163 bp 0x7ffc5f95a760 sp 0x7ffc5f95a758 READ of size 1 at 0x7ffc5f95a7fe thread T0 #0 0x51b162 (/out/package/mumsh_memory_check+0x51b162) #1 0x515c7e (/out/package/mumsh_memory_check+0x515c7e) #2 0x7ff584e39b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #3 0x41ccf9 (/out/package/mumsh_memory_check+0x41ccf9) Address 0x7ffc5f95a7fe is located in stack of thread T0 at offset 30 in frame #0 0x51590f (/out/package/mumsh_memory_check+0x
JOJ Answer
mumsh $ 123 mumsh $ mumsh $ exit