|
size_t RawLength=2*PswLength; |
|
WideToRaw(PwdW,PswLength,RawPsw,RawLength); |
|
if (Salt!=NULL) |
|
{ |
|
memcpy(RawPsw+RawLength,Salt,SIZE_SALT30); |
|
RawLength+=SIZE_SALT30; |
|
} |
|
sha1_context c; |
|
sha1_init(&c); |
|
|
|
const uint HashRounds=0x40000; |
Filename: crypt3.cpp
Line: 27
CWE: 190 (Integer Overflow or Wraparound)
This arithmetic operation results in an integer overflow error. Because the result of this calculation is larger than the maximum possible value for this data type, the result may wrap to become a very small, or negative number, therefore providing an unintended value. Integer overflows can often trigger buffer overflows, which can be exploited to execute arbitrary code. Verify that the result of the calculation does not wrap around before passing the result into other functions. References: CWE/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode
Sumatrapdf-cpp//ext/unrar/crypt3.cpp
Lines 22 to 32 in feca3c8
Filename: crypt3.cpp
Line: 27
CWE: 190 (Integer Overflow or Wraparound)
This arithmetic operation results in an integer overflow error. Because the result of this calculation is larger than the maximum possible value for this data type, the result may wrap to become a very small, or negative number, therefore providing an unintended value. Integer overflows can often trigger buffer overflows, which can be exploited to execute arbitrary code. Verify that the result of the calculation does not wrap around before passing the result into other functions. References: CWE/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode