From c24d383c15f6d31cd1dd5fb8e090db0561421599 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 15 Apr 2010 14:55:01 +0000 Subject: Avoid strdup(0) in build_opt_tbl Signed-off-by: Patrick Georgi Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5446 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/options/build_opt_tbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/options/build_opt_tbl.c') diff --git a/util/options/build_opt_tbl.c b/util/options/build_opt_tbl.c index b4e4151dc1..ae36f87e03 100644 --- a/util/options/build_opt_tbl.c +++ b/util/options/build_opt_tbl.c @@ -570,7 +570,7 @@ int main(int argc, char **argv) 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) { -- cgit v1.2.3