On Mon, Jun 16, 2008 at 01:29:33PM -0500, David E. Wheeler wrote:
> >Smells like uninitialized-memory problems to me. Perhaps you are
> >miscalculating the length of the input data?
>
> Entirely possible. Here are the two functions in which I calculate size:
Actually, real dumb question but: arn't you assume that text* values
are NULL terminated, because they're not...
>
> char * cilower(text * arg) {
> // Do I need to free anything here?
> char * str = VARDATA_ANY( arg );
str here is not null terminated. You need text_to_cstring or something
similar.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.