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 $ ================================================================= ==2380==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900000007f at pc 0x000000525519 bp 0x7ffef7a99990 sp 0x7ffef7a99988 READ of size 1 at 0x61900000007f thread T0 #0 0x525518 (/out/package/mumsh_memory_check+0x525518) #1 0x52c393 (/out/package/mumsh_memory_check+0x52c393) #2 0x52c7a3 (/out/package/mumsh_memory_check+0x52c7a3) #3 0x7fc72d47bb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #4 0x41d159 (/out/package/mumsh_memory_check+0x41d159) 0x61900000007f is located 1 bytes to the left of 1024-byte region [0x619000000080,0x619000000480) allocated by thread T0 here: #0 0x4dd010 (/out/package/mumsh_memory_check+0x4dd010) #1 0x52bcb7 (/out/package/mumsh_memory_check+0x52bcb7) #2 0x52c380 (/out/package/mumsh_memory_check+0x52c380) #3 0x52c7a3 (/out/package/mumsh_memory_check+0x52c7a3) #4 0x7fc72d47bb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: heap
JOJ Answer
mumsh $ > mumsh $ 123 mumsh $ 1.txt driver mumsh mumsh_memory_check mumsh $ exit