2010/11/29 Zoran Angelov <[email protected]>:
> Hi Koen,
> I think that i've found 2 issues with Postgres dbo backend:
> 1. When binding a bytearray (std::vector<unsigned char>) and the array is
> empty, on  inserting a new  record ( PostgresStatement::bind postgre...@150
> ), memcpy crashes the application.
>     Maybe zero-length check on bytearray is needed.

Indeed! I've added this check.

> 2. When retrieving the result of binded bytearray, after the bytearray has
> been unescaped with PQunescapeBytea ( PostgresStatement::getResult
> postgre...@384 ) freemem crashes the application.
>     I think that memory allocated by PQunescapeBytea needs to be freed with
> PQfreemem. I tried with PQfreemem and there was no crash.

I cannot recall anymore why I don't use PQfreemem there, apparently it
doesn't make a difference on linux/Unix.

Both issues will be fixed soon in our git repo.

Regards,
koen

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to