RFR: 8325680: Uninitialised memory in deleteGSSCB of GSSLibStub.c:179 [v2]

Rajan Halade rhalade at openjdk.org
Tue Feb 27 19:20:52 UTC 2024


On Tue, 27 Feb 2024 17:08:54 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Add a `memset` after memory is successfully allocated.
>> 
>> No regression test, hard to write without a KDC.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   use calloc

src/java.security.jgss/share/native/libj2gss/GSSLibStub.c line 199:

> 197:   }
> 198: 
> 199:   cb = calloc(1, sizeof(struct gss_channel_bindings_struct));

With this update, memset calls at line 220 are unnecessary.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18015#discussion_r1504826217



More information about the security-dev mailing list