diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
commit | 7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd (patch) | |
tree | d3e9e38245f10de28c87606c945c7fdd4bed0d76 /source/common/adfile.c | |
parent | 526d99544ba42a5a2155021975b3b97da425819e (diff) |
Notes
Diffstat (limited to 'source/common/adfile.c')
-rw-r--r-- | source/common/adfile.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/common/adfile.c b/source/common/adfile.c index 91b35c5ede8e..0b70d69e226c 100644 --- a/source/common/adfile.c +++ b/source/common/adfile.c @@ -203,11 +203,16 @@ FlGenerateFilename ( /* - * Copy the original filename to a new buffer. Leave room for the worst case - * where we append the suffix, an added dot and the null terminator. + * Copy the original filename to a new buffer. Leave room for the worst + * case where we append the suffix, an added dot and the null terminator. */ NewFilename = ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); + if (!NewFilename) + { + return (NULL); + } + strcpy (NewFilename, InputFilename); /* Try to find the last dot in the filename */ |