X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=abook.c;fp=abook.c;h=7410f6b50747f53b074f819c3be3a87168192764;hb=44943895d38d31d31e3d948e681b02f3be1cc83c;hp=37495613125918debf97c9541ab79a7c5c7c3579;hpb=6e550af8a907a680dc845c22a7d6c36d89e900c1;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index 3749561..7410f6b 100644 --- a/abook.c +++ b/abook.c @@ -420,8 +420,8 @@ parse_command_line(int argc, char **argv) fprintf(stderr, _("Invalid custom format string\n")); exit(EXIT_FAILURE); } - parsed_custom_format = (char *)malloc(FORMAT_STRING_LEN * sizeof(char*)); - custom_format_fields = (enum field_types *)malloc(FORMAT_STRING_MAX_FIELDS * sizeof(enum field_types *)); + parsed_custom_format = (char *)malloc(FORMAT_STRING_LEN); + custom_format_fields = (enum field_types *)malloc(FORMAT_STRING_MAX_FIELDS * sizeof(enum field_types)); parse_custom_format(custom_format, parsed_custom_format, custom_format_fields); } if(optind < argc) {