Author: oxygene Date: Thu Apr 15 16:55:01 2010 New Revision: 5446 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5446
Log: Avoid strdup(0) in build_opt_tbl
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de Acked-by: Patrick Georgi patrick.georgi@coresystems.de
Modified: trunk/util/options/build_opt_tbl.c
Modified: trunk/util/options/build_opt_tbl.c ============================================================================== --- trunk/util/options/build_opt_tbl.c Thu Apr 15 16:32:17 2010 (r5445) +++ trunk/util/options/build_opt_tbl.c Thu Apr 15 16:55:01 2010 (r5446) @@ -570,7 +570,7 @@ struct cmos_option_table *hdr; struct lb_record *ptr, *end;
- strncpy(tempfilename, dirname(strdup(option)), TMPFILE_LEN); + strncpy(tempfilename, dirname(strdup(header)), TMPFILE_LEN); strncat(tempfilename, TMPFILE_TEMPLATE, TMPFILE_LEN); tempfile = mkstemp(tempfilename); if(tempfile == -1) {