-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b84
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8186792 | 7u171 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8200006 | openjdk7u | Unassigned | P4 | Resolved | Fixed | master |
The return value of realloc must be checked to determine if the reallocation succeeded. The pointer to the original memory must be stored so that in the event that realloc fails, then the original memory can be freed.
Also the return value of malloc (and calloc) must be checked for failure.
The following files are effected:
src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
src/share/native/sun/security/jgss/wrapper/NativeUtil.c
src/share/native/sun/security/smartcardio/pcsc.c
src/solaris/native/com/sun/security/auth/module/Solaris.c
src/solaris/native/com/sun/security/auth/module/Unix.c
Also the return value of malloc (and calloc) must be checked for failure.
The following files are effected:
src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
src/share/native/sun/security/jgss/wrapper/NativeUtil.c
src/share/native/sun/security/smartcardio/pcsc.c
src/solaris/native/com/sun/security/auth/module/Solaris.c
src/solaris/native/com/sun/security/auth/module/Unix.c
- backported by
-
JDK-8186792 security native code doesn't always use malloc, realloc, and calloc correctly
- Resolved
-
JDK-8200006 security native code doesn't always use malloc, realloc, and calloc correctly
- Resolved
- duplicates
-
JDK-8001585 realloc is used naively in the native code
- Closed