how
could you explain more ?
char *ptr = buffer;
while(ptr > 1 && ptr < buffer+taille) { // walk to the end
However, this will have problems, too. It doesn't make sense to compare a pointer to an absolute value.
Explain what you are trying to do, if you want us to help you. It looks like you are trying to re-implement strchr().