From 430c005666f01bb51c10e2ac59fb33e7785f4fa0 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 10 Oct 2015 16:47:15 +0200 Subject: [PATCH] Corrected initial allocation size of a pointer array. Coverity CID 12588. --- libisofs/aaip_0_2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libisofs/aaip_0_2.c b/libisofs/aaip_0_2.c index 746dcb2..fc15e3d 100644 --- a/libisofs/aaip_0_2.c +++ b/libisofs/aaip_0_2.c @@ -1806,8 +1806,8 @@ int aaip_decode_attrs(struct aaip_state **handle, if(aaip->list_mem_used >= memory_limit) return(3); aaip->list_mem_used+= new_mem; - aaip->name_buf= calloc(sizeof(char *), Aaip_initial_name_leN); - aaip->value_buf= calloc(sizeof(char *), Aaip_initial_value_leN); + aaip->name_buf= calloc(1, Aaip_initial_name_leN); + aaip->value_buf= calloc(1, Aaip_initial_value_leN); if(aaip->name_buf == NULL || aaip->value_buf == NULL) return(-1); aaip->name_buf_size= Aaip_initial_name_leN;