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, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.
Please double check your code to solve this problem and try again.
Your Answer
p1.c:74:8: runtime error: index 1025 out of bounds for type 'char [1024]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1.c:74:8 in ================================================================= ==58733==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff2f8da461 at pc 0x0000005167a2 bp 0x7fff2f8da030 sp 0x7fff2f8da028 READ of size 1 at 0x7fff2f8da461 thread T0 #0 0x5167a1 (/out/package/mumsh_memory_check+0x5167a1) #1 0x7f080b8d3b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x41ca39 (/out/package/mumsh_memory_check+0x41ca39) Address 0x7fff2f8da461 is located in stack of thread T0 at offset 1057 in frame #0 0x514e0f (/out/package/mumsh_memory_check+0x514e0f) This frame has 8 object(s): [32, 1056) 'cmd' <== Memory access at offset 1057 overflows this variable [1184, 2208) 'exit' [2336, 3360) 'ls' [3488, 3496) 'name_list' [3520, 4544) 'cmd1' [4672, 5696) 'text' [5824, 6848) 'dest' [6976, 8000) 'dest138' HINT: this may be a fal
JOJ Answer
mumsh $ diff: missing operand after 'diff' diff: Try 'diff --help' for more information. mumsh $ exit