[CONC-93] No error checking on mysql_set_local_infile_handler(), silently falls back to default handler Created: 2014-05-01 Updated: 2014-05-01 |
|
| Status: | Open |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 2.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, but shouldn't matter |
||
| Description |
|
mysql_set_local_infile_handler() just copies over the given callback function pointers into the connection handles options structure without performing any checks:
Only when actually performing a LOAD DATA LOCAL INFILE query the given callback pointers are checked for not being NULL, and if any of them is then the custom infile handler is silently replaced by the default one:
Proposed changes:
|
| Comments |
| Comment by Georg Richter [ 2014-05-01 ] | |||||||||||
|
What about to copy callback functions pointers only if they are not NULL? A typical example would be when it's necessary to modify file content before sending it to the server. In this case you might not need callbacks for open, close and error functions. e.g.
|