Rockbox

Tasklist

FS#9354 - iso_decode function illegal address access

Attached to Project: Rockbox
Opened by Yoshihisa Uchida (Uchida) - Tuesday, 02 September 2008, 15:29 GMT
Task Type Patches
Category Applications
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

For
iso_decode(const unsigned char *iso, unsigned char *utf8, int cp, int count) (in firmware/common/unicode.c),

if count > strlen(iso), then "iso" accesses an illegal address. Therefore, a fatal error might occur.
This task depends upon

Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 03 September 2008, 06:08 GMT
That is correct, thanks for pointing it out.

However, we have plenty of code in Rockbox without bounds checking. The philosophy is that we generally don't want to waste code space with unnecessarily defensive programming.

Have you discovered a crash in Rockbox caused by iso_decode()?

What is your real name, so I can give you proper credit?
Comment by Yoshihisa Uchida (Uchida) - Thursday, 04 September 2008, 14:15 GMT
Fortunately, a fatal error has not been seen to occur.

I check the source that uses iso_decode(), because of it is sizeof(iso) >= count,
an illegal address is not accessed.

I'm sorry firing.

Finally, my real name is "Yoshihisa Uchida".

Loading...