Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003692 [Hessian] minor always 09-22-09 11:39 01-12-11 18:31
Reporter lcwik View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.1
  Product Build
Summary 0003692: MicroHessianOutput writeBytes wrong size
Description MicroHessianOutput writeBytes incorrectly encodes the size of the array into the stream. The "<<" is the wrong way.
Steps To Reproduce
Additional Information Fix:

  public void writeBytes(byte []buffer, int offset, int length)
    throws IOException
  {
    if (buffer == null) {
      os.write('N');
    }
    else {
      os.write('B');
      os.write(length >> 8);
      os.write(length);
      os.write(buffer, offset, length);
    }
  

Previously:

  public void writeBytes(byte []buffer, int offset, int length)
    throws IOException
  {
    if (buffer == null) {
      os.write('N');
    }
    else {
      os.write('B');
      os.write(length << 8);
      os.write(length);
      os.write(buffer, offset, length);
    }
  
Attached Files

- Relationships

- Notes
(0004925)
cfreyer
01-12-11 18:31
edited on: 01-12-11 18:31

I can confirm this defect. I've been using MicroHessionOutput in a mobile application I'm developing. All my outputs (with byte array length of > 180 bytes) were failing. Drove me crazy!! Once I applied the fix above, my application worked as designed. All of my defects disappeared.

 

- Issue History
Date Modified Username Field Change
09-22-09 11:39 lcwik New Issue
01-12-11 18:31 cfreyer Note Added: 0004925
01-12-11 18:31 cfreyer Note Edited: 0004925


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker