Avoid strdup(0) in build_opt_tbl
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5446 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -570,7 +570,7 @@ int main(int argc, char **argv)
|
|||||||
struct cmos_option_table *hdr;
|
struct cmos_option_table *hdr;
|
||||||
struct lb_record *ptr, *end;
|
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);
|
strncat(tempfilename, TMPFILE_TEMPLATE, TMPFILE_LEN);
|
||||||
tempfile = mkstemp(tempfilename);
|
tempfile = mkstemp(tempfilename);
|
||||||
if(tempfile == -1) {
|
if(tempfile == -1) {
|
||||||
|
Reference in New Issue
Block a user