From: Ilia Alshanetsky Date: Sun, 24 Dec 2006 20:50:02 +0000 (+0000) Subject: Added empty string checks X-Git-Tag: php-5.2.1RC2~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f46c4e90f073ce37ccb5ba806341fee1fc9ed1d;p=php Added empty string checks --- diff --git a/ext/sqlite/libsqlite/src/encode.c b/ext/sqlite/libsqlite/src/encode.c index 7d959b00ca..6318477857 100644 --- a/ext/sqlite/libsqlite/src/encode.c +++ b/ext/sqlite/libsqlite/src/encode.c @@ -176,9 +176,12 @@ int sqlite_decode_binary(const unsigned char *in, unsigned char *out){ int i, e; unsigned char c; e = *(in++); + if (e == 0) { + return 0; + } i = 0; while( (c = *(in++))!=0 ){ - if( c==1 ){ + if (c == 1) { c = *(in++) - 1; } out[i++] = c + e;