Address Sanitizer error in Rotate String question

I tried to know more about this error but, I was unable to understand thoroughly this error and how to even solve this. Here's the code :

bool rotateString(char * s, char * goal){
int ssize = strlen(s);
int goalsize = strlen(goal);
if(ssize != goalsize)
return false;
char *temp;
char x;
temp = (char )malloc(sizeof(char)(2
ssize+1));
strcat(temp, s);
strcat(temp, s);
x=strstr(temp, goal);
free(temp);
if(x != NULL)
return true;
else
return false;
}

And, here's the error :

==32==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000005b at pc 0x7fcdd672fa6d bp 0x7ffe825ae8f0 sp 0x7ffe825ae098
READ of size 12 at 0x60200000005b thread T0
#0 0x7fcdd672fa6c (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c)
#3 0x7fcdd5b900b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
0x60200000005b is located 0 bytes to the right of 11-byte region [0x602000000050,0x60200000005b)
allocated by thread T0 here:
#0 0x7fcdd67d5bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
#3 0x7fcdd5b900b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c)
Shadow bytes around the buggy address:
0x0c047fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c047fff8000: fa fa 06 fa fa fa 06 fa fa fa 00[03]fa fa fa fa
0x0c047fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==32==ABORTING

Comments (0)