rugged 0.25.0 → 0.25.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7c6702ff8d1ff0c9c82ed452dc97b5f070f0bfa
4
- data.tar.gz: a8e2f585ba932121e5e26ea29bfe7fe0b60a8d9a
3
+ metadata.gz: 6ec5164b83d057969697f3f9be23a9e908e54a2b
4
+ data.tar.gz: 9fbd0c6b51a94b8999691c4dfae404ec94e3b1ff
5
5
  SHA512:
6
- metadata.gz: 8f5079be650d4c3af4f7cf786e531a114f272bf777bc7f3c71dec98955bbcadb85676d4b96384eef2ded67666f80dc0957f628e5565f4657ca5d288ba0d5c8dd
7
- data.tar.gz: b88543357bc283cd08a8214e56e4bd6f3172293e46e2ddcab93aca4bf2197e7187c08e0ed6a3e7924b82504605622563f6de3c2a71a6ee7d7ff832a5f7f9165c
6
+ metadata.gz: 3ae5843efb4f94a4eae1ab37e2c657206a73ade6fc3c5525feb507589609f74059182b30946a8e674665c27765db1fc60c5ce405fe734baacf568f92658444fc
7
+ data.tar.gz: 8c2abf82e42b5f0f20f4482c9bb6266621ce525a11b9a05dce36c1992637bee6cc710219711cc4bdb655e694ba3b746269284ba484efb63d681f69853771b0c4
@@ -4,5 +4,5 @@
4
4
  # For full terms see the included LICENSE file.
5
5
 
6
6
  module Rugged
7
- Version = VERSION = '0.25.0'
7
+ Version = VERSION = '0.25.1'
8
8
  end
@@ -7,10 +7,10 @@
7
7
  #ifndef INCLUDE_git_version_h__
8
8
  #define INCLUDE_git_version_h__
9
9
 
10
- #define LIBGIT2_VERSION "0.25.0"
10
+ #define LIBGIT2_VERSION "0.25.1"
11
11
  #define LIBGIT2_VER_MAJOR 0
12
12
  #define LIBGIT2_VER_MINOR 25
13
- #define LIBGIT2_VER_REVISION 0
13
+ #define LIBGIT2_VER_REVISION 1
14
14
  #define LIBGIT2_VER_PATCH 0
15
15
 
16
16
  #define LIBGIT2_SOVERSION 25
@@ -624,13 +624,12 @@ static int http_connect(http_subtransport *t)
624
624
  if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
625
625
  git_stream_is_encrypted(t->io)) {
626
626
  git_cert *cert;
627
- int is_valid;
627
+ int is_valid = (error == GIT_OK);
628
628
 
629
629
  if ((error = git_stream_certificate(&cert, t->io)) < 0)
630
630
  return error;
631
631
 
632
632
  giterr_clear();
633
- is_valid = error != GIT_ECERTIFICATE;
634
633
  error = t->owner->certificate_check_cb(cert, is_valid, t->connection_data.host, t->owner->message_cb_payload);
635
634
 
636
635
  if (error < 0) {
@@ -427,15 +427,23 @@ int git_pkt_parse_line(
427
427
  if (bufflen > 0 && bufflen < (size_t)len)
428
428
  return GIT_EBUFS;
429
429
 
430
+ /*
431
+ * The length has to be exactly 0 in case of a flush
432
+ * packet or greater than PKT_LEN_SIZE, as the decoded
433
+ * length includes its own encoded length of four bytes.
434
+ */
435
+ if (len != 0 && len < PKT_LEN_SIZE)
436
+ return GIT_ERROR;
437
+
430
438
  line += PKT_LEN_SIZE;
431
439
  /*
432
- * TODO: How do we deal with empty lines? Try again? with the next
433
- * line?
440
+ * The Git protocol does not specify empty lines as part
441
+ * of the protocol. Not knowing what to do with an empty
442
+ * line, we should return an error upon hitting one.
434
443
  */
435
444
  if (len == PKT_LEN_SIZE) {
436
- *head = NULL;
437
- *out = line;
438
- return 0;
445
+ giterr_set_str(GITERR_NET, "Invalid empty packet");
446
+ return GIT_ERROR;
439
447
  }
440
448
 
441
449
  if (len == 0) { /* Flush pkt */
@@ -763,14 +763,6 @@ static int add_push_report_sideband_pkt(git_push *push, git_pkt_data *data_pkt,
763
763
  line_len -= (line_end - line);
764
764
  line = line_end;
765
765
 
766
- /* When a valid packet with no content has been
767
- * read, git_pkt_parse_line does not report an
768
- * error, but the pkt pointer has not been set.
769
- * Handle this by skipping over empty packets.
770
- */
771
- if (pkt == NULL)
772
- continue;
773
-
774
766
  error = add_push_report_pkt(push, pkt);
775
767
 
776
768
  git_pkt_free(pkt);
@@ -825,9 +817,6 @@ static int parse_report(transport_smart *transport, git_push *push)
825
817
 
826
818
  error = 0;
827
819
 
828
- if (pkt == NULL)
829
- continue;
830
-
831
820
  switch (pkt->type) {
832
821
  case GIT_PKT_DATA:
833
822
  /* This is a sideband packet which contains other packets */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugged
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-06 00:00:00.000000000 Z
12
+ date: 2017-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler