| Bug #75372 | incorrect code(or indenting) | ||
|---|---|---|---|
| Submitted: | 1 Jan 2015 11:07 | Modified: | 10 Apr 2015 0:04 |
| Reporter: | Joshua Rogers | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 5.7.6 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[1 Jan 2015 11:07]
Joshua Rogers
[1 Jan 2015 13:07]
MySQL Verification Team
Verified by reading code. In event of OOM situation, a crash could occur on the 'args[1]= b' since the { } are missing.
---
arg_count= 5;
if ((args= (Item**) sql_alloc(sizeof(Item*)*5)))
args[0]= a; args[1]= b; args[2]= c; args[3]= d; args[4]= e;
---
Should probably be:
---
arg_count= 5;
if ((args= (Item**) sql_alloc(sizeof(Item*)*5)))
{
args[0]= a; args[1]= b; args[2]= c; args[3]= d; args[4]= e;
}
---
[10 Apr 2015 0:04]
Paul DuBois
Noted in 5.7.8, 5.8.0 changelogs. The parser could dereference a null pointer after an out-of-memory error.
