mjansson / mdns

Public domain mDNS/DNS-SD library in C
The Unlicense
437 stars 117 forks source link

memcpy safety #48

Closed ben-sedg closed 3 years ago

ben-sedg commented 3 years ago

Replace all memcpy calls with memmove. memcpy is unsafe in calls where memory may overlap. The safe alternative are the same calls with memmove.

mjansson commented 3 years ago

The buffers never overlap if you look at where and how memcpy calls are made.