trilogy 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa039c6b0e08712590ea5c50bea7c9a6418d56b1878b3c2935568248d0c5deb5
4
- data.tar.gz: f76d5315bd82dd00a58c43d7de51885448ba3b72fb0e2adcca3fd132e4bd1163
3
+ metadata.gz: 50f7b9c6e6db317bed3d230ffc0714c109ac78cce85a391a3530cee82c8676e2
4
+ data.tar.gz: 7c95de9ace5aa5669ce8fac0bd95513be353cce52bed60a6441a9558dd18abe5
5
5
  SHA512:
6
- metadata.gz: 45cb57bc1614f81b1f477e987936b00ba97ec75acd4b88d4e86640848442daa76993cb14fe6b39bccf76c3e7a5a1dc6f86c37d5af96e179c0889c9e50356cac9
7
- data.tar.gz: 5da626807137fe79611a85157b4537fde0c7451c047074ddac514732ecfed04f0e665b9e432607aa52fb73830bad176dd6d640fb2ab87019b71e46a44fea3b52
6
+ metadata.gz: 88a4f0114420039839374a8526dea80982862772d7b89e940dd509109b61500191723912372d3798415c02b8af9168b8f7d5dceaec79518577096a0314c1d0f5
7
+ data.tar.gz: 16d595b50c2804a377cdb8899add3ac9158b2991297fe6163c83d7699b216222fc3991c84c5dc67a8331bbe1480cd7c3afc24938297a46a34630d4bb47452602
@@ -209,4 +209,9 @@ static TRILOGY_ENCODING_t charset_to_encoding_map[] = {
209
209
  [TRILOGY_CHARSET_EUCJPMS_BIN] = TRILOGY_ENCODING_EUCJPMS,
210
210
  };
211
211
 
212
- TRILOGY_ENCODING_t trilogy_encoding_from_charset(TRILOGY_CHARSET_t charset) { return charset_to_encoding_map[charset]; }
212
+ TRILOGY_ENCODING_t trilogy_encoding_from_charset(TRILOGY_CHARSET_t charset) {
213
+ if ((unsigned)charset >= TRILOGY_CHARSET_MAX) {
214
+ return TRILOGY_ENCODING_BINARY;
215
+ }
216
+ return charset_to_encoding_map[charset];
217
+ }
@@ -214,6 +214,7 @@ int trilogy_flush_writes(trilogy_conn_t *conn)
214
214
 
215
215
  static void set_error(trilogy_conn_t *conn, const trilogy_err_packet_t *packet)
216
216
  {
217
+ conn->server_status &= ((uint16_t)~TRILOGY_SERVER_STATUS_MORE_RESULTS_EXISTS);
217
218
  conn->error_code = packet->error_code;
218
219
  conn->error_message = packet->error_message;
219
220
  conn->error_message_len = packet->error_message_len;
@@ -312,7 +313,7 @@ static int read_eof_packet(trilogy_conn_t *conn)
312
313
 
313
314
  static int read_auth_switch_packet(trilogy_conn_t *conn, trilogy_handshake_t *handshake)
314
315
  {
315
- trilogy_auth_switch_request_packet_t auth_switch_packet;
316
+ trilogy_auth_switch_request_packet_t auth_switch_packet = {0};
316
317
 
317
318
  int rc = trilogy_parse_auth_switch_request_packet(conn->packet_buffer.buff, conn->packet_buffer.len,
318
319
  conn->capabilities, &auth_switch_packet);
@@ -1,3 +1,3 @@
1
1
  class Trilogy
2
- VERSION = "2.13.0"
2
+ VERSION = "2.13.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Engineering