diff options
author | bde <bde@FreeBSD.org> | 1997-04-30 17:51:29 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-04-30 17:51:29 +0000 |
commit | 68962748a62c84f65a1ae9237ef08348c6f49f6a (patch) | |
tree | 7b40347a81de18d4bb6df8a08ab911164d9ad066 /bin/dd | |
parent | 97eaf329289ea795b79f1e97db8bc5094fe617aa (diff) | |
download | FreeBSD-src-68962748a62c84f65a1ae9237ef08348c6f49f6a.zip FreeBSD-src-68962748a62c84f65a1ae9237ef08348c6f49f6a.tar.gz |
Fixed overflow for attempts to seek to offsets > ULONG_MAX. See the
OpenBSD version for more complete fixes. E.g., to seek to offsets >
INT_MAX using a block size of 1, block numbers need to be off_t's
instead of u_long's.
Diffstat (limited to 'bin/dd')
-rw-r--r-- | bin/dd/position.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dd/position.c b/bin/dd/position.c index 9c5616d..9e2ed77 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: position.c,v 1.5 1997/02/22 14:02:48 peter Exp $ */ #ifndef lint @@ -67,7 +67,7 @@ pos_in() /* If not a character, pipe or tape device, try to seek on it. */ if (!(in.flags & (ISCHR|ISPIPE|ISTAPE))) { - if (lseek(in.fd, (off_t)(in.offset * in.dbsz), SEEK_CUR) == -1) + if (lseek(in.fd, (off_t)in.offset * in.dbsz, SEEK_CUR) == -1) err(1, "%s", in.name); return; } |