mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 17:31:43 +01:00
File positions are off_t nowdays, not long, so:
strtol -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
This commit is contained in:
parent
dde24897d2
commit
7a27e6571b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82766
@ -356,7 +356,7 @@ doskip(fname, statok)
|
||||
}
|
||||
}
|
||||
if (S_ISREG(sb.st_mode)) {
|
||||
if (fseek(stdin, skip, SEEK_SET))
|
||||
if (fseeko(stdin, skip, SEEK_SET))
|
||||
err(1, "%s", fname);
|
||||
address += skip;
|
||||
skip = 0;
|
||||
|
@ -104,7 +104,7 @@ newsyntax(argc, argvp)
|
||||
add("\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"");
|
||||
break;
|
||||
case 's':
|
||||
if ((skip = strtol(optarg, &p, 0)) < 0)
|
||||
if ((skip = strtoll(optarg, &p, 0)) < 0)
|
||||
errx(1, "%s: bad skip value", optarg);
|
||||
switch(*p) {
|
||||
case 'b':
|
||||
|
@ -214,7 +214,7 @@ odoffset(argc, argvp)
|
||||
base = 10;
|
||||
}
|
||||
|
||||
skip = strtol(num, (char **)&end, base ? base : 8);
|
||||
skip = strtoll(num, (char **)&end, base ? base : 8);
|
||||
|
||||
/* if end isn't the same as p, we got a non-octal digit */
|
||||
if (end != p) {
|
||||
|
Loading…
Reference in New Issue
Block a user