yaz0 0.1.1 → 0.2.0

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
  SHA256:
3
- metadata.gz: b98ce34773d7c314618d2dd957582ae19852e5741cc71a5a2703db1e1b8d6f71
4
- data.tar.gz: c85ece9160207be1ce84c2edb5b0935c2cee6bf1d84b3b0aa0dd43c25f76ffaa
3
+ metadata.gz: 672cee69a6f75dd7377cf5eb17baeb36275224f98021be0a26f575488b29ea35
4
+ data.tar.gz: 7ac698b98f48d2816a2b0852e1b8937a9f6d77613b94e7e8cc81f8e7ff03df08
5
5
  SHA512:
6
- metadata.gz: b5c80c5a7a0c28240fd3d315ebe5f31aa02a13e64012935778176d26e46575b4f81e197a68c0faa4e343e9d475aa9da344a546b0578bd3b34917b9585fcce35c
7
- data.tar.gz: 9ba7d55ba7dc73ef3b1bd6e9d041112de31a2055b9eff0b48eb6fb5ec1a86832268161be3c48238b35284d49d0a3b18c535ae84f1ddb295ca6543f7c37421eda
6
+ metadata.gz: 488b8a8e52fc4e9d74caf1db27383cd6be5a5307c8a703b74cc3ec4c175c71bf883c1c4fc82146646ed79a53728c4d6508638914840b5ca16633a0bcbf61f97c
7
+ data.tar.gz: a06e7544dbad27a7d1647ba621d2abadea7e17cb4fed47a1fbf78e91e4fff81af56955f7423b028265bcd2b51cfadc724ff9dd79b48d72cf7dffc4103f2c0863
@@ -23,13 +23,14 @@ int yaz0Decompress(Yaz0Buffer *dst, const char *d, size_t dataLen)
23
23
 
24
24
  inCursor = 0x10;
25
25
  dst->data = realloc(dst->data, dstSize);
26
+ dst->capacity = dstSize;
26
27
 
27
- while (inCursor < dataLen)
28
+ while (inCursor < dataLen && dst->size < dstSize)
28
29
  {
29
30
  group = data[inCursor++];
30
31
  for (int b = 0; b < 8; ++b)
31
32
  {
32
- if (inCursor >= dataLen)
33
+ if (inCursor >= dataLen || dst->size >= dstSize)
33
34
  break;
34
35
 
35
36
  if (group & (1 << (7 - b)))
data/lib/yaz0/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yaz0
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaz0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nax