Re: [sqlite] [Bug]Type mismatch in call to sqlite3MPrintf

2011-06-24 Thread Richard Hipp
On Fri, Jun 24, 2011 at 2:17 PM, Arushi Aggarwal wrote:

> Hi all,
>
> While using sqlite to test a dynamic type tracking tool for LLVM that we
> are
> developing, we found the following bug in sqlite.
>
> I have sqlite version 3.7.6.3, and in the following call to sqlite3MPrintf
>
>  zStmt = sqlite3MPrintf(db, "CREATE%s INDEX %.*s",
>onError==OE_None ? "" : " UNIQUE",
>pEnd->z - pName->z + 1,
>pName->z);
>

Fixed here:  http://www.sqlite.org/src/ci/90cfeaf7b6


>
> from the function sqlite3CreateIndex, the argument 4th argument (pEnd->z -
> pName->z + 1) is a 64 bit integer on x86_64. However, the format string
> expects an int (in sqlite3VXPrintf).
>
> I have not found a case where the value of the argument is actually greater
> than a 32 bit int. However, in some execution that might be the case.
>
> Thanks,
> Regards,
>
> Arushi Aggarwal
> Graduate Student,
>  Department of Computer Science,
> University of Illinois, Urbana-Champaign.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] [Bug]Type mismatch in call to sqlite3MPrintf

2011-06-24 Thread Arushi Aggarwal
Hi all,

While using sqlite to test a dynamic type tracking tool for LLVM that we are
developing, we found the following bug in sqlite.

I have sqlite version 3.7.6.3, and in the following call to sqlite3MPrintf

  zStmt = sqlite3MPrintf(db, "CREATE%s INDEX %.*s",
onError==OE_None ? "" : " UNIQUE",
pEnd->z - pName->z + 1,
pName->z);

from the function sqlite3CreateIndex, the argument 4th argument (pEnd->z -
pName->z + 1) is a 64 bit integer on x86_64. However, the format string
expects an int (in sqlite3VXPrintf).

I have not found a case where the value of the argument is actually greater
than a 32 bit int. However, in some execution that might be the case.

Thanks,
Regards,

Arushi Aggarwal
Graduate Student,
 Department of Computer Science,
University of Illinois, Urbana-Champaign.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users