Thanks!

I forgot about C array numeration... Sorry for being an arse.


Eugene

2011/3/13 Drake Wilson <dr...@begriffli.ch>

> Quoth Eugene N <neverov.biks.0...@gmail.com>, on 2011-03-13 18:14:49
> +0200:
> > uchar* pblah[1];
> >
> > pblah[0] = (uchar*)malloc(10);
> >
> > pblah[1] = (uchar*)malloc(10);   // notice the order
> >
> > sqlite3* db;
>
> Your C code is broken.  pblah is an array of 1 element, which is
> accessible (among other ways) as pblah[0].  pblah[1] is out of bounds,
> and depending on how the compiler allocates those vars it may wind up
> aliasing the db pointer.  This is not an SQLite problem.
>
>   ---> Drake Wilson
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to