Jonas Borgström 11 سال پیش
والد
کامیت
9e9ece675d
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 6 0
      CHANGES
  2. 1 1
      attic/_hashindex.c

+ 6 - 0
CHANGES

@@ -3,6 +3,12 @@ Attic Changelog
 
 
 Here you can see the full list of changes between each Attic release.
 Here you can see the full list of changes between each Attic release.
 
 
+Version 0.8.1
+-------------
+
+(bugfix release, released on Oct 4, 2013)
+
+- Fix segmentation fault issue.
 
 
 Version 0.8
 Version 0.8
 -----------
 -----------

+ 1 - 1
attic/_hashindex.c

@@ -92,7 +92,7 @@ hashindex_lookup(HashIndex *index, const void *key)
             }
             }
         }
         }
         else if(BUCKET_MATCHES_KEY(index, idx, key)) {
         else if(BUCKET_MATCHES_KEY(index, idx, key)) {
-            if (didx != -1) {
+            if (didx != -1 && !index->readonly) {
                 memcpy(BUCKET_ADDR_WRITE(index, didx), BUCKET_ADDR_READ(index, idx), index->bucket_size);
                 memcpy(BUCKET_ADDR_WRITE(index, didx), BUCKET_ADDR_READ(index, idx), index->bucket_size);
                 BUCKET_MARK_DELETED(index, idx);
                 BUCKET_MARK_DELETED(index, idx);
                 idx = didx;
                 idx = didx;