[CONC-505] Don't allow passing unsupported client flags to mysql_real_connect () Created: 2020-10-15  Updated: 2022-07-01

Status: Open
Project: MariaDB Connector/C
Component/s: Security
Affects Version/s: 3.1.10
Fix Version/s: 3.1, 3.3

Type: Bug Priority: Critical
Reporter: Georg Richter Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Passing an unsupported client capability flag in mysql_real_connect might lead to unexpected behavior and crashes.

#define CLIENT_DEPRECATE_EOF (1ULL << 24)
 
unsigned long client_flags = CLIENT_REMEMBER_OPTIONS | CLIENT_DEPRECATE_EOF;
 
if (mysql_real_connect(mysql, host, user, password, db, 0, NULL, client_flags))
{
  printf("error: %s\n", mysql_error(mysql));
}


Generated at Thu Feb 08 03:05:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.