1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

use an size_t not a ssize_t when checking for out of bounds errors

(This used to be commit 044af3cf977e3172b3b1ce3f71457d5b0a4fc1b2)
This commit is contained in:
Andrew Tridgell 2000-04-24 14:36:25 +00:00
parent 73417c07f7
commit e4f8301edf

View File

@ -199,7 +199,7 @@ static int tdb_oob(TDB_CONTEXT *tdb, tdb_off offset)
if ((offset <= tdb->map_size) || (tdb->fd == -1)) return 0;
fstat(tdb->fd, &st);
if (st.st_size <= (ssize_t)offset) {
if (st.st_size <= (size_t)offset) {
tdb->ecode = TDB_ERR_IO;
return -1;
}