[Freeipa-devel] Re: [PATCH] COLLECTION patches resending

Dmitri Pal dpal at redhat.com
Fri Jul 10 21:29:06 UTC 2009


>>> These unsigned values are the size of the internal stack or depth level.
>>> They need to  always be positive this is why they are unsigned.
>>> I do not want obfuscate the error by preventing them to go below 0.
>>> If it goes the program will crash and we will see the problem.
>>>       
>
> Are you sure that the program will crash or maybe just override some
> random memory? If you use a macro you can call abort() if the value is
> 0 and the program will definitely exit.
>
>   
It will become MAX unsigned. Since the variable is used as an index to
the array it will point to some unrelated memory and program will get
memory violation.
But the place where it was a problem is in the function that i fixed
with the second patch.

Thanks for reviewing!

Dmitri






More information about the Freeipa-devel mailing list