#include<stdio.h>
#include<string.h>
int main()
{
char *str1[10] = {src};
char *str2[10] = {dest};
memcpy(str1, str2, -1);
return 1;
}
This simple test case of negative memcpy() fails on PC with glibc, but
executes well on uClibc on MIPS target. -1 should translate to a large
positive number and while doing memcpy(), program should access
illegal memory and should get segmentation fault. This happens on PC
with glibc environment.
Why this program runs on uClibc?
-Manish
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc