fix(contacts): adversarial-review fixes — delete UB, JPEG decode, footer clip
From an adversarial review of the avatar edit-dialog + image picker: - HIGH: the per-row Delete icon called doDelete() (which erases from book.entries()) INSIDE the loop iterating that same vector — out-of-bounds reads / wrong rows on the confirming click. Defer it until after the loop. - HIGH: the decode stack was compiled PNG-only (STBI_ONLY_PNG) while the image picker accepts .jpg/.jpeg/.bmp/.gif, so picking a JPEG (the common photo case) silently produced a non-loading avatar + an orphaned copy on disk. Enable JPEG/BMP/GIF decoders, and guard the pick: verify the source decodes before copying/committing (new contact_avatar_bad_image string, 8 langs). - MED: the fixed, non-scrolling edit card floored bodyH at 260*dp, which could push Save/Cancel below the card on short windows — floor lowered so the footer always stays inside. - LOW: the live-preview panel rounding is now dp-scaled (10*dp) to match the real list card it mirrors. - LOW: re-picking the same source path after its contents changed showed a stale cached texture — evict the avatar texture cache entry on re-pick. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,7 @@
|
||||
"console_zoom_in": "Vergrößern",
|
||||
"console_zoom_out": "Verkleinern",
|
||||
"contact_avatar": "AVATAR",
|
||||
"contact_avatar_bad_image": "Dieses Bild konnte nicht geladen werden.",
|
||||
"contact_avatar_badge": "Abzeichen",
|
||||
"contact_avatar_badge_hint": "Das Abzeichen wird automatisch anhand des Adresstyps gewählt.",
|
||||
"contact_avatar_choose": "Bild auswählen…",
|
||||
|
||||
Reference in New Issue
Block a user