[MDEV-20085] Negative count causes SQL repeat() to set expected result length to 16MB instead of 0 Created: 2019-07-18 Updated: 2019-08-09 Resolved: 2019-08-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.4, 10.5 |
| Fix Version/s: | 10.3.18 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Roman | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
There is an incorrect result item length assigned when a negative repeat() counter used. Here is the assignement when we implicitly cast signed to unsigned getting overflow if count < 0. Later MDB assignes 16MB inside fix_char_length_ulonglong(). This causes a crash in CS. Here are the steps to reproduce.
|
| Comments |
| Comment by Roman [ 2019-07-18 ] |
|
Kindly find the fix for the issue attached. |
| Comment by Roman [ 2019-08-09 ] |
|
The original issue in MDB has been fixed so I close the issue. |