Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG in CsConvert::convert (#2) [CORE1596] #2017

Closed
firebird-automations opened this issue Nov 15, 2007 · 14 comments
Closed

BUG in CsConvert::convert (#2) [CORE1596] #2017

firebird-automations opened this issue Nov 15, 2007 · 14 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @ibprovider

Attachments:
CsConvert_1_14_diff.txt

Wrong cycle with scan of spaces

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

No a size of temp_buffer (CORE1594)

No a count of converted bytes (dest count). (CORETHIS_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 CORE1594

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 :)))

Commits: f043833 608fa01 690a5ce

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

This is not a competition for who can register more bugs.
Reopening the other one should be sufficient.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1 RC1 [ 10201 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13421 ] => Firebird [ 14071 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

Corrections for CsConvert:convert

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @ibprovider

Attachment: CsConvert_1_14_diff.txt [ 11100 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Re-opened to apply (or reject) the attached corrections by Dmitry Kovalenko (see his recent comment).

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1.2 [ 10270 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

Adriano, Thank you very much!

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment