Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==36287==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff46d05840 at pc 0x00000051ec52 bp 0x7fff46cb7470 sp 0x7fff46cb7468
READ of size 8 at 0x7fff46d05840 thread T0
    #0 0x51ec51  (/out/package/ex1+0x51ec51)
    #1 0x51f5cf  (/out/package/ex1+0x51f5cf)
    #2 0x51f16b  (/out/package/ex1+0x51f16b)
    #3 0x51f03c  (/out/package/ex1+0x51f03c)
    #4 0x51ca9c  (/out/package/ex1+0x51ca9c)
    #5 0x51bc1c  (/out/package/ex1+0x51bc1c)
    #6 0x51ab8e  (/out/package/ex1+0x51ab8e)
    #7 0x7f8c4c8deb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #8 0x41e2a9  (/out/package/ex1+0x41e2a9)

Address 0x7fff46d05840 is located in stack of thread T0 at offset 320032 in frame
    #0 0x51babf  (/out/package/ex1+0x51babf)

  This frame has 2 object(s):
    [32, 320032) 'A' <== Memory access at offset 320032 overflows this variable
    [320288, 320320) 'str'
HINT: this may be a false positive if your program uses some custom stack unwind mech

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


        

JOJ Answer

letter from a birmingham jail king jr 16 april 1963 my dear fellow clergymen while confined here in the birmingham city jail i came across your recent statement calling my present activities unwise and untimely seldom do i pause to answer criticism of my work and ideas if i sought to answer all the criticisms that cross my desk my secretaries would have little time for anything other than such correspondence in the course of the day and i would have no time for constructive work but since i feel that you are men of genuine good will and that your criticisms are sincerely set forth i want to try to answer your statement in what i hope will be patient and reasonable terms i am in birmingham because injustice is here i am cognizant of the interrelatedness of all communities and states i cannot sit idly by in atlanta and not be concerned about what happens in birmingham injustice anywhere is a threat to justice everywhere we are caught in an inescapable network of mutuality tied in a single garment of destiny wha