paolostivanin / OTPClient

Highly secure and easy to use OTP client written in C/GTK3 that supports both TOTP and HOTP
GNU General Public License v3.0
481 stars 47 forks source link

Import from Aegis with custom icons causes crash #371

Closed cinimodev closed 4 months ago

cinimodev commented 4 months ago

Aegis allows users to select custom images from their camera roll as the icon for for service. I was playing around with the feature as a gag. When importing an Aegis encrypted export, OTP Client crashes. I tested with and without custom icons and the custom icon set causes a crash each time. The imports without custom images (or the stock icon) does not crash.

This is not a major issue. Just wanted to pass along the info in case anyone else has this issue.

elliotwutingfeng commented 4 months ago

The Aegis android app itself is known to crash with an Out of Memory error when importing vaults with very large custom icons, perhaps this might be related.

paolostivanin commented 4 months ago

Thanks for reporting this. I'll have a look at it.

If you could provide a simple reproducer, that would be fantastic though :smile:

paolostivanin commented 4 months ago

The crash is likely to happen because the icons are consuming all the secure memory. Can you please tell me whether the custom icons are using a dedicated key (e.g. custom_icon) or just the usual icon key?

paolostivanin commented 4 months ago

Could you please try the fix in this branch and let me know? Thanks!