Where am i getting this bus error? : <p>When I compile this code I experience a bus error and I don't understand what I'm doing to cause this. I read up what a bus error entails and I still don't quite see my problem. This code should reproduce the behaviour of the strcpy() function in the string.h library.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>#include &lt;unistd.h&gt;

void	ft_putstr(char *str)
{
	while (*str)
		write(1, str++, 1);
}

char	*ft_strcpy(char *dest, char *src)
{
	int	index;

	index = 0;
	while (src[index] != '\0')
	{
		dest[index] = src[index];
		index++;
	}
	dest[index] = '\0';
	return (dest);
}

int	main(void)
{
	char *str1, *str2, *cpy;

	str1 = "Cameron";
	str2 = "Why you no work?";
	cpy = ft_strcpy(str1, str2);
	ft_putstr(cpy);
	return (0);
}</code></pre>
</div>
</div>
</p>
