Mercurial > hg > release > icedtea6-1.6
view patches/security/20100330/6902299.patch @ 1723:d48a4f542e7d
Add new security patches and fix srcdir!=builddir issues.
2009-03-30 Andrew John Hughes <ahughes@redhat.com>
* patches/icedtea-systemtap.patch:
Moved to HotSpot-specific patch tree.
* Makefile.am: Add new security patches
and add $(HSBUILD) to systemtap patch.
Put copied OpenJDK files in openjdk-copy
rather than a duplicate rt directory
in the build tree.
* NEWS: List new security patches.
* patches/hotspot/default/systemtap.patch:
From patches/icedtea-systemtap.patch.
* patches/hotspot/original/icedtea-format.patch,
* patches/hotspot/original/systemtap.patch:
Added for original HotSpot build.
* patches/security/20100330/6626217.patch,
* patches/security/20100330/6633872.patch,
* patches/security/20100330/6639665.patch,
* patches/security/20100330/6736390.patch,
* patches/security/20100330/6745393.patch,
* patches/security/20100330/6887703.patch,
* patches/security/20100330/6888149.patch,
* patches/security/20100330/6892265.patch,
* patches/security/20100330/6893947.patch,
* patches/security/20100330/6893954.patch,
* patches/security/20100330/6898622.patch,
* patches/security/20100330/6898739.patch,
* patches/security/20100330/6899653.patch,
* patches/security/20100330/6902299.patch,
* patches/security/20100330/6904691.patch,
* patches/security/20100330/6909597.patch,
* patches/security/20100330/6910590.patch,
* patches/security/20100330/6914823.patch,
* patches/security/20100330/6914866.patch,
* patches/security/20100330/6932480.patch,
* patches/security/20100330/hotspot/default/6894807.patch,
* patches/security/20100330/hotspot/original/6894807.patch:
New security and hardening patches
http://www.oracle.com/technology/deploy/security/critical-patch-updates/javacpumar2010.html
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Tue, 30 Mar 2010 23:04:54 +0100 |
parents | |
children |
line wrap: on
line source
--- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.cpp Tue Feb 16 13:34:13 2010 +++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.cpp Tue Feb 16 13:34:12 2010 @@ -40,7 +40,7 @@ void bytes::malloc(size_t len_) { len = len_; - ptr = NEW(byte, len_+1); // add trailing zero byte always + ptr = NEW(byte, add_size(len_, 1)); // add trailing zero byte always if (ptr == null) { // set ptr to some victim memory, to ease escape set(dummy, sizeof(dummy)-1); @@ -56,7 +56,7 @@ return; } byte* oldptr = ptr; - ptr = (len_ >= PSIZE_MAX) ? null : (byte*)::realloc(ptr, len_+1); + ptr = (len_ >= PSIZE_MAX) ? null : (byte*)::realloc(ptr, add_size(len_, 1)); if (ptr != null) { mtrace('r', oldptr, 0); mtrace('m', ptr, len_+1); --- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp Tue Feb 16 13:34:15 2010 +++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp Tue Feb 16 13:34:14 2010 @@ -488,7 +488,7 @@ maybe_inline void unpacker::saveTo(bytes& b, byte* ptr, size_t len) { - b.ptr = U_NEW(byte, len+1); + b.ptr = U_NEW(byte, add_size(len,1)); if (aborting()) { b.len = 0; return; @@ -675,7 +675,7 @@ if (archive_size < header_size_1) { abort("too much read-ahead"); // somehow we pre-fetched too much? return; - } + } input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)), (size_t) header_size_0 + archive_size); CHECK; @@ -1129,7 +1129,7 @@ *fillp = 0; // bigbuf must contain a well-formed Utf8 string int length = fillp - bigbuf.ptr; bytes& value = cpMap[i].value.b; - value.set(U_NEW(byte, length+1), length); + value.set(U_NEW(byte, add_size(length,1)), length); value.copyFrom(bigbuf.ptr, length); CHECK; // Index all Utf8 strings @@ -1601,7 +1601,7 @@ return no_bands; } else { int nb = bs_limit - bs_base; - band** res = U_NEW(band*, nb+1); + band** res = U_NEW(band*, add_size(nb, 1)); CHECK_(no_bands); for (int i = 0; i < nb; i++) { band* b = (band*) band_stack.get(bs_base + i); @@ -1710,7 +1710,7 @@ } // save away the case labels int ntags = band_stack.length() - case_base; - int* tags = U_NEW(int, 1+ntags); + int* tags = U_NEW(int, add_size(ntags, 1)); CHECK_(lp); k_case.le_casetags = tags; *tags++ = ntags; @@ -3115,8 +3115,8 @@ int* field_counts = T_NEW(int, nclasses); int* method_counts = T_NEW(int, nclasses); cpindex* all_indexes = U_NEW(cpindex, nclasses*2); - entry** field_ix = U_NEW(entry*, nfields+nclasses); - entry** method_ix = U_NEW(entry*, nmethods+nclasses); + entry** field_ix = U_NEW(entry*, add_size(nfields, nclasses)); + entry** method_ix = U_NEW(entry*, add_size(nmethods, nclasses)); for (j = 0; j < nfields; j++) { entry& f = fields[j]; @@ -4104,7 +4104,7 @@ } const char* suffix = ".java"; int len = prefix.len + strlen(suffix); - bytes name; name.set(T_NEW(byte, len + 1), len); + bytes name; name.set(T_NEW(byte, add_size(len, 1)), len); name.strcat(prefix).strcat(suffix); ref = cp.ensureUtf8(name); } @@ -4619,7 +4619,7 @@ bytes& prefix = cur_class->ref(0)->value.b; const char* suffix = ".class"; int len = prefix.len + strlen(suffix); - bytes name; name.set(T_NEW(byte, len + 1), len); + bytes name; name.set(T_NEW(byte, add_size(len, 1)), len); cur_file.name = name.strcat(prefix).strcat(suffix).strval(); } } else { @@ -4686,6 +4686,7 @@ input.ensureSize(fleft); } rplimit = rp = input.base(); + CHECK; input.setLimit(rp + fleft); if (!ensure_input(fleft)) abort("EOF reading resource file");