Qualcomm Interview Question
Product Security Engineersso, here if i am not wrong we are trying both the cases right?
case 1: if the address of source pointer is less than the address of destination pointer(i.e the memory block where s1 is pointing is placed before the memory block where s2 is pointing)
for that we need to check, s2>s1+n, if not overlap occurs
case 2: if the address of destination pointer is less than the address of source pointer(i.e the memory block where s2 is pointing is placed before the memory block where s1 is pointing)
for that we need to check, s1>s2+n, if not overlap occurs
I guess that's wat anonymous checked....pls correct me if iam wrong!
- Anonymous February 09, 2012