|
|
|
hexsyntax.c using strtol on the offset parameter | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi, I'd like to start out that I'm not a huge C buff but now a tad here and there. Now a friend of mine called David Trail noticed while trying to hexdump the last sector of his 1 TB drive that he got what seems to be an overflow on hexdump: david@tiamat:~ $ sudo hexdump -s3364995079 -n64 /dev/sda > tmp1 david@tiamat:~ $ sudo hexdump -s10002048860167 -n64 /dev/sda > tmp2 david@tiamat:~ $ diff tmp1 tmp2 david@tiamat:~ $ The line I think I have it narrowed down to is line 92 of util-linux/hexsyntax.c where the -s parameter is converted to a long. Sadly the size of a 1 TB disk overflows the size of a long. Can the off_t maybe be changed to use off64_t (if this is relevant) and use strtoull instead of strtol? I think it might give some space in the near future. Thanks in advance, Simon de Vlieger -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]