mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
MFB: Added empty string checks
This commit is contained in:
parent
2185635e10
commit
59b437aff8
1 changed files with 4 additions and 1 deletions
|
@ -176,9 +176,12 @@ int sqlite_decode_binary(const unsigned char *in, unsigned char *out){
|
||||||
int i, e;
|
int i, e;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
e = *(in++);
|
e = *(in++);
|
||||||
|
if (e == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
while( (c = *(in++))!=0 ){
|
while( (c = *(in++))!=0 ){
|
||||||
if( c==1 ){
|
if (c == 1) {
|
||||||
c = *(in++) - 1;
|
c = *(in++) - 1;
|
||||||
}
|
}
|
||||||
out[i++] = c + e;
|
out[i++] = c + e;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue