diff options
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 91b35c5ede8ef..0b70d69e226c8 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 */ |