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
try to use memcpy when we know the source length.
memcpy will operate on word or double-word, unlike iio_strlcpy which
operates on a byte basis. Mark these calls as Flawfinder ignore, since
we check the dest buffer length to to the source length before we do a
copy.
Rather than itererate over the dest string to find the end (with
strrchr), just keep track with math. We know the start, and we know the
length (from the outputs of iio_snprintf & iio_strlcpy), so just add
them.
Signed-off-by: Robin Getz <[email protected]>
0 commit comments