Skip to content

Fix UBSAN false positive (backport #3483)#3485

Merged
kmilos merged 1 commit into0.28.xfrom
mergify/bp/0.28.x/pr-3483
Feb 16, 2026
Merged

Fix UBSAN false positive (backport #3483)#3485
kmilos merged 1 commit into0.28.xfrom
mergify/bp/0.28.x/pr-3483

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Feb 16, 2026

This fixes a (false positive) error from UBSAN:

INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 3590403533
INFO: Loaded 2 modules   (184486 inline 8-bit counters): 183894 [0x76d8651991c0, 0x76d8651c6016), 592 [0x62495a70b448, 0x62495a70b698), 
INFO: Loaded 2 PC tables (184486 PCs): 183894 [0x76d8651c6018,0x76d865494578), 592 [0x62495a70b698,0x62495a70db98), 
./bin/fuzz-read-print-write: Running 1 inputs 1 time(s) each.
Running: crash-01c9e1813f47c45ee6be5c976f16641176e51982
/home/kev/work/exiv2/src/image.cpp:651:10: 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 /home/kev/work/exiv2/src/image.cpp:651:10 

It's a false positive because size is zero, so it doesn't matter that bytes is NULL. But it's easy to fix by returning early if size == 0.


This is an automatic backport of pull request #3483 done by Mergify.

(cherry picked from commit 38b989a)
@mergify mergify Bot mentioned this pull request Feb 16, 2026
@kmilos kmilos added this to the v0.28.8 milestone Feb 16, 2026
@kmilos kmilos merged commit 9f4eff3 into 0.28.x Feb 16, 2026
83 of 87 checks passed
@mergify mergify Bot deleted the mergify/bp/0.28.x/pr-3483 branch February 16, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants