Well-meaning strangers could be putting dogs at risk by offering treats.