src/hash_SHA2_template.c:97: bad if test ?

Bug #1279231 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

Static analyser cppcheck says many things about pycrypto-2.6.1,
including

[src/hash_SHA2_template.c:97]: (style) Same expression on both sides of '>'.

Source code is

        if (hs->length_upper > hs->length_upper)
            return 0;

I checked the latest source code in github and it looks broken there also.

Revision history for this message
Legrandin (gooksankoo) wrote :

That is harmless dead code that should be removed.

It purely influences the return value of the function add_length(), but such value is ignored by all of its callers anyway.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.