summaryrefslogtreecommitdiff
path: root/lib/backend
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-10-14 12:17:01 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-10-14 12:17:01 +0300
commit19027cb53f3e559cca3d0ddc4e193fab37840d96 (patch)
treeb2ee3ca98994d4456acb562e562dc95b93730037 /lib/backend
parentef9744ff76f1ceed7645731bb6c102845eb48b79 (diff)
downloadrpm-19027cb53f3e559cca3d0ddc4e193fab37840d96.tar.gz
rpm-19027cb53f3e559cca3d0ddc4e193fab37840d96.tar.bz2
rpm-19027cb53f3e559cca3d0ddc4e193fab37840d96.zip
Avoid overflow on memcpy()
Diffstat (limited to 'lib/backend')
-rw-r--r--lib/backend/sqlite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c
index a9404b108..8466c5c71 100644
--- a/lib/backend/sqlite.c
+++ b/lib/backend/sqlite.c
@@ -455,7 +455,7 @@ if (dbiByteSwapped(dbi) == 1)
memcpy(dbswap.ui, &hnum, sizeof(dbswap.ui));
dbswap.ui[1] = 0;
_DBSWAP(dbswap);
- memcpy(&hnum, dbswap.ui, sizeof(dbswap.ui));
+ memcpy(&hnum, dbswap.ui, sizeof(hnum));
}
rc = sqlite3_bind_int(scp->pStmt, pos, hnum);
} break;
@@ -490,7 +490,7 @@ if (dbiByteSwapped(dbi) == 1)
memcpy(dbswap.ui, &i, sizeof(dbswap.ui));
dbswap.ui[1] = 0;
_DBSWAP(dbswap);
- memcpy(&i, dbswap.ui, sizeof(dbswap.ui));
+ memcpy(&i, dbswap.ui, sizeof(i));
}
rc = sqlite3_bind_int(scp->pStmt, pos, i);
} break;