What changed, and why it matters
This commit removes an unused function for drawing transparent characters on the BitBox02 hardware wallet screen. It is a straightforward code cleanup with no security relevance visible in the change.
No security action needed; treat as normal refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the public UG_PutCharTransparent() API and the internal ‘transparent’ boolean parameter from _UG_PutChar() in the ugui embedded UI library. The renderer now always draws the background color, since transparency was never used. No callers are updated because the removed entry point had none.
Changed components
src/ui/ugui/ugui.csrc/ui/ugui/ugui.hInspect captured patch +3 / −13
diff --git a/src/ui/ugui/ugui.c b/src/ui/ugui/ugui.c
index 392c517..6c9f0cb 100644
--- a/src/ui/ugui/ugui.c
+++ b/src/ui/ugui/ugui.c
@@ -80,7 +80,7 @@ static void _UG_PSet(UG_S16 x, UG_S16 y, UG_COLOR c)
}
static void _UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc,
- const UG_FONT *font, bool transparent)
+ const UG_FONT *font)
{
UG_U16 i, j, k, xo, yo, c, bn, actual_char_width;
UG_U8 b, bt;
@@ -148,7 +148,7 @@ static void _UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc,
for ( k = 0; (k < 8) && c; k++ ) {
if ( b & 0x01 ) {
_UG_PSet(xo, yo, fc);
- } else if ( !transparent ) {
+ } else {
_UG_PSet(xo, yo, bc);
}
b >>= 1;
@@ -821,16 +821,7 @@ void UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc )
return;
}
- _UG_PutChar(chr, x, y, fc, bc, &gui->font, false);
-}
-
-void UG_PutCharTransparent( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc )
-{
- if (gui == NULL) {
- return;
- }
-
- _UG_PutChar(chr, x, y, fc, 0x00, &gui->font, true);
+ _UG_PutChar(chr, x, y, fc, bc, &gui->font);
}
void UG_SetForecolor( UG_COLOR c )
diff --git a/src/ui/ugui/ugui.h b/src/ui/ugui/ugui.h
index fb23690..fafd4e2 100644
--- a/src/ui/ugui/ugui.h
+++ b/src/ui/ugui/ugui.h
@@ -123,7 +123,6 @@ void UG_MeasureStringCentered( UG_S16 *xout, UG_S16 *yout, const char *str);
void UG_PutStringNoBreakCenter( UG_S16 x, UG_S16 y, UG_S16 width, const char *str);
void UG_PutStringCentered( UG_S16 x, UG_S16 y, UG_S16 width, UG_S16 height, const char *str);
void UG_PutChar( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc, UG_COLOR bc );
-void UG_PutCharTransparent( char chr, UG_S16 x, UG_S16 y, UG_COLOR fc );
void UG_SetForecolor( UG_COLOR c );
void UG_SetBackcolor( UG_COLOR c );
UG_S16 UG_GetXDim( void );
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.