Skip to content

Commit 712d3a5

Browse files
Ben WagnerSkia Commit-Bot
authored andcommitted
Cannot create SkFontData with no data.
Bug: oss-fuzz:26254 Change-Id: Ia4ce4eabacbd9811bc0fdf09b509fd69650cce53 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327816 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
1 parent 36700ef commit 712d3a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/SkFontDescriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static size_t SK_WARN_UNUSED_RESULT read_id(SkStream* stream) {
5656
}
5757

5858
std::unique_ptr<SkFontData> SkFontDescriptor::maybeAsSkFontData() {
59-
if (!fVariationDataIsOldAndBad) {
59+
if (!fVariationDataIsOldAndBad || !this->hasStream()) {
6060
return nullptr;
6161
}
6262
SkFontArguments args;

0 commit comments

Comments
 (0)