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
Too large numbers cause positive infinity to be inserted into database [CORE1362] #1780
Comments
Commented by: @dyemanov The crash is ISQL-specific, it just doesn't expect a converted-from-double string to be longer than 23 bytes. Otherwise, the allocated buffer is trashed and the heap corruption happens. |
Commented by: Claudio Valderrama C. (robocop) Bill, please open a separate report for isql. |
Modified by: @pcisarWorkflow: jira [ 12595 ] => Firebird [ 14210 ] |
Modified by: Claudio Valderrama C. (robocop)summary: Too large numbers cause crash or positive infinity to be inserted into database => Too large numbers cause positive infinity to be inserted into database |
Modified by: Claudio Valderrama C. (robocop)assignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: Claudio Valderrama C. (robocop) Sorry, this became overlooked. Actually, Alex solved it a lot of time ago, in revision 1.22 of src/common/cvt.cpp, before Beta2. |
Modified by: Claudio Valderrama C. (robocop)status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Beta 2 [ 10300 ] |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: Bill Oliver (verbguy)
Is related to QA330
Reported against 2.1 beta 1, but has been around much longer, surely. The first test will let you put postive infinity NAN into database. I think this should be disallowed. Second test causes a crash.
create database 'test.fdb';
create table test (col1 double precision);
-- works
insert into test values (1.79769313486231570E+308);
-- too big, should err
insert into "TEST" ( "COL1" ) values ( 1.79769313486232e+308 ) ;
commit;
select * from test;
=======================
1.797693134862316e+308
1.#INF00000000000
commit;
-- this did crash
select -2.488355210669293e+39 from rdb$database;
=======================
-2488355210669293000000000000000000000000.000000
QUIT:
The text was updated successfully, but these errors were encountered: