Using saturation
n You can fix this by using conditionals
unsigned char p1,p2,p3;
int I3= (int)p1 + (int)p2;
p3=(I3>255?255:(unsigned char)I3);