Eliminating uninitialized memory reads/copies, this was warned:

        /* Create new entry... */
        conf = realloc(conf, sizeof(config_entry_t) * (cur_section + 1));
        /* ...and initialize it */
        memcpy(&(conf[cur_section]), &(conf[0]), sizeof(config_entry_t));


I "fixed" it by adding the memset line @
        conf = malloc(sizeof(config_entry_t));
        memset(conf, 0, sizeof(config_entry_t));


I didn't really understand what was going on here, so this may not be a
proper fix. If anyone else knows what should be happening here, please do
a proper fix and/or let me know what's going on there.

Thanks!


--
http://www.clock.org/~matt


Reply via email to