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
Finally proper compiler warning (on my system it was reporting -1 as the out of bounds index).
The code here assumes that hash_length(alg) <= SHA512_DIGEST_LENGTH for each and every hashing algorithm that may ever reach the point. The only supported algorithm seems to be SHA256, so... that seems to be false alert, if treated literally; OTOH that should be clear from the code (like defining and using MAX_DIGEST_LENGTH or so).
Minetest version
Commit: 3ce03d1
Type: Build issue / warning
OS / Hardware
Operating system: Ubuntu 18.04
Compiler: Gcc/G++ (Ubuntu 10.1.0-2ubuntu1~18.04) 10.1.0
Summary
Got this compilation warning on build with gcc 10.
Steps to reproduce
Compile with gcc 10.
Link to code:
https://github.com/minetest/minetest/blob/master/src/util/srp.cpp#L424-L437
Previous bug on this line
#6855
The text was updated successfully, but these errors were encountered: