summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-04-18 15:20:54 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-18 15:20:54 -0700
commit03546553205b56fc1ba0318b146971f43f54a155 (patch)
tree38ee8c8ae14b5063e5b034dc7efe070f45ccdb78
parent7b3298804c6ac57bce9eb4f590f22ac836818a8b (diff)
parentb73a0ef4d05ad594ba07b98e1f4aa7fe66a18c2e (diff)
downloadsystem_core-03546553205b56fc1ba0318b146971f43f54a155.zip
system_core-03546553205b56fc1ba0318b146971f43f54a155.tar.gz
system_core-03546553205b56fc1ba0318b146971f43f54a155.tar.bz2
am b73a0ef4: Merge "use lseek64 to resolve offset oveflow"
* commit 'b73a0ef4d05ad594ba07b98e1f4aa7fe66a18c2e': use lseek64 to resolve offset oveflow
-rw-r--r--toolbox/dd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toolbox/dd.c b/toolbox/dd.c
index 350f1d2..a8c12d2 100644
--- a/toolbox/dd.c
+++ b/toolbox/dd.c
@@ -590,8 +590,8 @@ pos_in(void)
/* If not a pipe or tape device, try to seek on it. */
if (!(in.flags & (ISPIPE|ISTAPE))) {
- if (lseek(in.fd,
- (off_t)in.offset * (off_t)in.dbsz, SEEK_CUR) == -1) {
+ if (lseek64(in.fd,
+ (off64_t)in.offset * (off64_t)in.dbsz, SEEK_CUR) == -1) {
fprintf(stderr, "%s: seek error: %s",
in.name, strerror(errno));
exit(1);
@@ -661,8 +661,8 @@ pos_out(void)
* have specified the seek operand.
*/
if (!(out.flags & ISTAPE)) {
- if (lseek(out.fd,
- (off_t)out.offset * (off_t)out.dbsz, SEEK_SET) == -1) {
+ if (lseek64(out.fd,
+ (off64_t)out.offset * (off64_t)out.dbsz, SEEK_SET) == -1) {
fprintf(stderr, "%s: seek error: %s\n",
out.name, strerror(errno));
exit(1);