]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - wma_afh.c
string: Introduce arr_alloc().
[paraslash.git] / wma_afh.c
index a6fbecca59252e9ee403d7c9e0f454a0eff16e13..8bff7cfcaa98f8ae3bdfb00f87545c70c7927d94 100644 (file)
--- a/wma_afh.c
+++ b/wma_afh.c
@@ -195,7 +195,7 @@ static int wma_make_chunk_table(char *buf, size_t buf_size, uint32_t packet_size
        size_t ct_size = 250;
        int ret, count = 0, num_frames, num_superframes;
 
-       afhi->chunk_table = alloc(ct_size * sizeof(uint32_t));
+       afhi->chunk_table = arr_alloc(ct_size, sizeof(uint32_t));
        afhi->chunk_table[0] = 0;
        afhi->chunk_table[1] = afhi->header_len;
 
@@ -622,7 +622,7 @@ static int wma_rewrite_tags(const char *map, size_t mapsize,
        if (top.reserved2 != 2)
                return -E_NO_WMA;
        p++; /* objects start at p */
-       top.objects = alloc(top.num_objects * sizeof(struct asf_object));
+       top.objects = arr_alloc(top.num_objects, sizeof(struct asf_object));
        ret = read_asf_objects(p, top.size - (p - map), top.num_objects,
                top.objects, &ton);
        if (ret < 0)