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
In file airspy.c, function airspy_version_string_read() :
The following two lines are inconsistent :
memcpy(version, version_local, length-1);
version[length] = 0;
Either the memory copy must be of "length" size, either "version[length-1]" must be set to 0.
There is no documentation in comments so I guess "length" is the size of the "version" buffer so "version[length-1]" must be used.
The text was updated successfully, but these errors were encountered:
Thanks for the issue.
It is broken since 55f5e47 (Affect release v1.0.6)
Note: It is funny static analysis tool like cppcheck v1.71 does not detect it.
In file airspy.c, function airspy_version_string_read() :
The following two lines are inconsistent :
memcpy(version, version_local, length-1);
version[length] = 0;
Either the memory copy must be of "length" size, either "version[length-1]" must be set to 0.
There is no documentation in comments so I guess "length" is the size of the "version" buffer so "version[length-1]" must be used.
The text was updated successfully, but these errors were encountered: