https://review.source.android.com/#patch,sidebyside,14699,1,libc/memset.c
That fix was commited on the 12th of may. So the bug is in all versions up to 2.1. Wow. I’m not throwing stones as i have sined myself a lot. But this boggles the mind a little 🙂
The bug was present because it’s a code path that’s never exercised, at least in stock Android builds. We use a faster version of memset 🙂
Yowzers… This seems like it’d be a highly trafficked piece of code, so darn surprising it was broken until recently. Any idea on how it affected anything or was this limited to NDK usage of memset function via C / C++?
@Romain so the Framework itself uses another libc? Interesting.
In any case it’s probably not all that bad as most people will use it to set a block of memory to zero. shit happens 🙂