Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 913985 Details for
Bug 1115264
Incorrect de-serialization leading to stream corruption in Big Endian systems
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[RFC Patch] Fix SUID issue in LZF compression.
UnsafeChunkEncoderBE_java.patch (text/plain), 1.67 KB, created by
IBM Bug Proxy
on 2014-07-02 05:00:46 UTC
(
hide
)
Description:
[RFC Patch] Fix SUID issue in LZF compression.
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2014-07-02 05:00:46 UTC
Size:
1.67 KB
patch
obsolete
>--- a/UnsafeChunkEncoderBE.java 2014-06-17 14:23:54.000000000 +0530 >+++ b/UnsafeChunkEncoderBE.java 2014-06-13 21:32:41.000000000 +0530 >@@ -98,7 +98,7 @@ public final class UnsafeChunkEncoderBE > int i1 = unsafe.getInt(in, BYTE_ARRAY_OFFSET + ptr1); > int i2 = unsafe.getInt(in, BYTE_ARRAY_OFFSET + ptr2); > if (i1 != i2) { >- return 1 + _leadingBytes(i1, i2); >+ return 1 + _leadingBytes(Integer.reverseBytes(i1), Integer.reverseBytes(i2)); > } > ptr1 += 4; > ptr2 += 4; >@@ -106,7 +106,7 @@ public final class UnsafeChunkEncoderBE > i1 = unsafe.getInt(in, BYTE_ARRAY_OFFSET + ptr1); > i2 = unsafe.getInt(in, BYTE_ARRAY_OFFSET + ptr2); > if (i1 != i2) { >- return 5 + _leadingBytes(i1, i2); >+ return 5 + _leadingBytes(Integer.reverseBytes(i1), Integer.reverseBytes(i2)); > } > return _findLongMatchLength(in, ptr1+4, ptr2+4, maxPtr1); > } >@@ -120,7 +120,7 @@ public final class UnsafeChunkEncoderBE > long l1 = unsafe.getLong(in, BYTE_ARRAY_OFFSET + ptr1); > long l2 = unsafe.getLong(in, BYTE_ARRAY_OFFSET + ptr2); > if (l1 != l2) { >- return ptr1 - base + (Long.numberOfLeadingZeros(l1 ^ l2) >> 3); >+ return ptr1 - base + (Long.numberOfTrailingZeros(Long.reverseBytes(l1) ^ Long.reverseBytes(l2)) >> 3); > } > ptr1 += 8; > ptr2 += 8; >@@ -134,6 +134,6 @@ public final class UnsafeChunkEncoderBE > } > > private final static int _leadingBytes(int i1, int i2) { >- return (Long.numberOfLeadingZeros(i1 ^ i2) >> 3); >+ return (Long.numberOfTrailingZeros(i1 ^ i2) >> 3); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1115264
:
913983
|
913984
| 913985