Ah, this sort of question pops up every week…
One thing that must be stated in every C tutorial: the environment of the C library and the runtime do not guarantee that any misuse, mistyped access or other not-well-defined operation will be caught and properly reported as such. Main point of this is efficiency. You obey the rules (and are responsible for them to be fulfilled), and the runtime is built around them, efficiently proxying the programming environment model down to hardware and to the kernel.
Note about why this is happening. The environment you see in C and it's runtime library is much simpler than underlying mechanisms that actually do the job. In this case, you see that malloc
got a big chunk of memory from the system onto process's dynamic data section and returned address of smaller sub-chunk, and remembered that it is in use in it's own structures. What your code is trying to perform is called buffer overflow. And what it really does is: trashing internal structures of malloc, or writing to another allocated chunk (resulting in serious delayed problems), or writing to unallocated section (resulting in absolutely no problems in current process's future).