Issue Details (XML | Word | Printable)

Key: CORE-1596
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Kovalenko Dmitry
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

BUG in CsConvert::convert (#2)

Created: 15/Nov/07 04:59 PM   Updated: 20/Aug/16 06:03 PM
Component/s: Engine
Affects Version/s: 2.1 Beta 2
Fix Version/s: 2.1 RC1, 2.1.2, 2.5 Beta 1

File Attachments: 1. Text File CsConvert_1_14_diff.txt (1 kB)

QA Status: Cannot be tested

 Description  « Hide
Wrong cycle with scan of spaces

We must use count of converted (actual) bytes at temp_buffer

No a size of temp_buffer (CORE-1594)

No a count of converted bytes (dest count). (CORE-THIS_BUG)

Primary problem - using SINGLE local variable ' len ' for all cases:
1 - size of temp_buffer
2 - count of converted bytes from source into temp_buffer
3 - count of converted bytes in dest buffer.

On finish the "len" contaings the count of converted bytes IN DEST BUFFER.

But is used for scan of temp_buffer

Use 3 independent local variables and do scan FROM errPos TO count of bytes getted from second conversion (count of actually bytes in temp_buffer)

See attached source code in CORE-1594

And just commit my changes.

I afraid, you can continue making a new bugs :)))

Latest changes in ChConvert.h (1.7) added new interesting bug - Now we, instead of buffer with UCS2 symbols of source string, scan the spaces at the left temp2 buffer.

Left buffer with left length :)))

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 15/Nov/07 08:09 PM
This is not a competition for who can register more bugs.
Reopening the other one should be sufficient.

Kovalenko Dmitry added a comment - 18/Oct/08 11:43 AM
Corrections for CsConvert:convert

1. asserts before if-verification
2. using a 'len' before if-verification - temp.shrink(len / 2);

Dmitry Yemanov added a comment - 20/Oct/08 05:33 AM
Re-opened to apply (or reject) the attached corrections by Dmitry Kovalenko (see his recent comment).

Kovalenko Dmitry added a comment - 20/Oct/08 05:15 PM
Adriano, Thank you very much!