You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace strcpy and snprintf in remaining user in libiio
https://cwe.mitre.org/data/definitions/120.html defines
strcpy as potentially dangerous, and is included in Microsoft's
banned.h
snprintf has a iio_ special version that uses sprintf_s with Microsoft
Compilers. sprintf_s guarantees that the buffer will be null-terminated
unless the buffer size is zero (among other things). Linux snprintf does
this by default.
replace strncpy with iio_strlcpy
taking advantage of mandatory null termination in iio_strlcpy
replace snprintf with iio_snprintf
Signed-off-by: Robin Getz <[email protected]>
0 commit comments