Skip to content

Commit 0b56314

Browse files
committed
Logo: don't segfault if --logo-source starts with non-alpha charactors
Ref: #518
1 parent 082038f commit 0b56314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/logo/logo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static bool logoHasName(const FFlogo* logo, const FFstrbuf* name, bool small)
211211

212212
static const FFlogo* logoGetBuiltin(const FFstrbuf* name, FFLogoSize size)
213213
{
214-
if (name->length == 0)
214+
if (name->length == 0 || !isalpha(name->chars[0]))
215215
return NULL;
216216

217217
for(const FFlogo* logo = ffLogoBuiltins[toupper(name->chars[0]) - 'A']; *logo->names; ++logo)

0 commit comments

Comments
 (0)