aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-03-26 14:51:07 +0000
committerdrh <drh@noemail.net>2014-03-26 14:51:07 +0000
commit182ea4e3246fce6a468625812f1bf603b9690a30 (patch)
tree1cf8febf45f2dafe6445f1a0d4a146430cb54f9a /src
parente2ac506704e76a26352626788910d62f00dd1f63 (diff)
downloadsqlite-182ea4e3246fce6a468625812f1bf603b9690a30.tar.gz
sqlite-182ea4e3246fce6a468625812f1bf603b9690a30.zip
Earlier detection of corruption in sqlite3VdbeRecordCompare() in order to
avoid a potential buffer overread. FossilOrigin-Name: 28ddecff044dbc2dff50a7d8406ab67dfe06587f
Diffstat (limited to 'src')
-rw-r--r--src/vdbeaux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 18862028e..f5e4b0a9f 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -3434,6 +3434,7 @@ int sqlite3VdbeRecordCompare(
}else{
idx1 = getVarint32(aKey1, szHdr1);
d1 = szHdr1;
+ if( d1>(unsigned)nKey1 ) return 1; /* Corruption */
i = 0;
}