RFR: 8314148: Fix variable scope in SunMSCAPI
Daniel JeliĆski
djelinski at openjdk.org
Fri Aug 11 19:36:28 UTC 2023
On Fri, 11 Aug 2023 16:53:41 GMT, Mark Powers <mpowers at openjdk.org> wrote:
>> Please review this patch that fixes the scope of 2 local variables to make sure they are in scope when they are used.
>>
>> The patch additionally fixes one `c++11-narrowing` Clang warning by explicitly casting string size (`size_t`) to `DWORD`.
>
> src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp line 946:
>
>> 944: break;
>> 945: case 1:
>> 946: BCRYPT_PKCS1_PADDING_INFO pkcs1Info;
>
> Don't lines 1181 and 1196 have the same problem?
Good catch! Interestingly, that code appears to compile correctly. I'll fix it anyway.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15242#discussion_r1291701470
More information about the security-dev
mailing list