diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-11-17 16:54:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-22 14:28:05 +0100 |
commit | 9d4627322f5e2753b29cc310f1da9e433d986ae7 (patch) | |
tree | 082fcdfee250dc3d76816cbae1ecd2c5e649b06f /external | |
parent | 8f46b6d847e8dc9f3bea44d0bd76f517c1e54163 (diff) |
exteral/freetype: -fsanitize=non-null-attribute
Crashreport log:
workdir/UnpackedTarball/freetype/src/psaux/psobjs.c:204:5: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
workdir/UnpackedTarball/freetype/src/psaux/psobjs.c:204:5 in
Change-Id: Ib2ae396ba640129a8bc1c937ce41a38b6279a2ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143098
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'external')
-rw-r--r-- | external/freetype/ubsan.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/external/freetype/ubsan.patch b/external/freetype/ubsan.patch index c8173eeff531..62d31f5d3be9 100644 --- a/external/freetype/ubsan.patch +++ b/external/freetype/ubsan.patch @@ -9,3 +9,15 @@ /* outer loop steps through master designs to be blended */ for ( master = 0; master < varData->regionIdxCount; master++ ) +--- src/psaux/psobjs.c.orig 2022-11-17 16:52:21.913211573 +0100 ++++ src/psaux/psobjs.c 2022-11-17 16:53:17.905127207 +0100 +@@ -201,7 +201,8 @@ + /* add the object to the base block and adjust offset */ + table->elements[idx] = FT_OFFSET( table->block, table->cursor ); + table->lengths [idx] = length; +- FT_MEM_COPY( table->block + table->cursor, object, length ); ++ if (table->block + table->cursor) ++ FT_MEM_COPY( table->block + table->cursor, object, length ); + + table->cursor += length; + return FT_Err_Ok; |