fixed build

Mon, 12 Aug 2013 16:32:30 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 12 Aug 2013 16:32:30 +0200
changeset 9
6aec77cfa95b
parent 8
4503498deb22
child 10
e6d0fbe0ebd9

fixed build

dav/config.c file | annotate | diff | comparison | revisions
dav/crypto.c file | annotate | diff | comparison | revisions
--- a/dav/config.c	Mon Aug 12 15:58:30 2013 +0200
+++ b/dav/config.c	Mon Aug 12 16:32:30 2013 +0200
@@ -88,7 +88,7 @@
         node = node->next;
     }
     
-    // TODO: free doc
+    xmlFreeDoc(doc);
 }
 
 void load_repository(xmlNode *reponode) {
--- a/dav/crypto.c	Mon Aug 12 15:58:30 2013 +0200
+++ b/dav/crypto.c	Mon Aug 12 16:32:30 2013 +0200
@@ -51,7 +51,7 @@
 
 size_t aes_write(const void *buf, size_t s, size_t n, AESDecrypter *dec) {
     int len = s*n;
-    int outlen = len + AES_BLOCK_SIZE;
+    int outlen = len + 16;
     unsigned char *out = malloc(outlen);
     EVP_DecryptUpdate(&dec->ctx, out, &len, buf, len);
     dec->write(out, 1, len, dec->stream);
@@ -117,12 +117,12 @@
     void *out = NULL;
     int outlen = 0;
     if(in_len != 0) {
-        outlen = len + AES_BLOCK_SIZE;
+        outlen = len + 16;
         out = malloc(outlen);
         EVP_EncryptUpdate(&enc->ctx, out, &outlen, in, in_len);
         //out = (char*)aes_encrypt(enc->ctx, (unsigned char*)in, (int*)&in_len);
     } else {
-        out = malloc(AES_BLOCK_SIZE);
+        out = malloc(16);
         EVP_EncryptFinal_ex(&enc->ctx, out, &outlen);
         enc->end = 1;
     }

mercurial