directive output truncated writing 48 bytes into a region of size between 0 and 2 [-Werror=format-truncation=]

why am i getting this warning when compiling
int ret = snprintf(temp2, sizeof(buf), "Name :%s\r\n\r\n------------------------------------------\r\n", user->name);