tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: __ssp_overlap() bug?



On Sep 2,  9:31pm, plunky%ogmig.net@localhost (Iain Hibbert) wrote:
-- Subject: __ssp_overlap() bug?

| Hi
| 
| I think the recently added __ssp_overlap() macro is incorrect, as adjacent 
| areas will trigger it. example test code below shows the problem..
| 
| #include <ssp/ssp.h>
| #include <stdio.h>
| 
| int a, b;
| 
| int
| main(int argc, char *argv[])
| {
| 
| 	printf("a %p, b %p, l %zu\n", &a, &b, sizeof(a));
| 
| 	if (__ssp_overlap((char *)&a, (char *)&b, sizeof(a)))
| 		printf("a and b overlap\n");
| 	else
| 		printf("no overlap\n");
| 
| 	return 0;
| }
| 
| and patch to fix.. is this ok to commit?

Yes, please go for it!

Thanks,

christos


Home | Main Index | Thread Index | Old Index