1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Don't assume sizeof(int)==4 in bittorrent

(cherry picked from commit f3bad399e2)
This commit is contained in:
Kalle Olavi Niemitalo 2008-01-26 15:55:46 +02:00 committed by Kalle Olavi Niemitalo
parent cade70e745
commit 9699a03e74
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -309,6 +309,7 @@ To be released as 0.11.4.
* minor bug 461: ensure contrast in blank areas, to keep the cursor visible
* minor bug 928: properly display no-break spaces in a UTF-8 document
if the terminal uses some other charset
* minor: don't assume sizeof(int)==4 in bittorrent
* trivial bug 947: document.html.wrap_nbsp also affects text in tables
* trivial bug 997: fix unlikely stack corruption in active FTP
* build bug 950: fix ``config/install-sh: No such file or directory''

View File

@ -1079,7 +1079,7 @@ bittorrent_resume_writer(void *data, int fd)
uint32_t piece;
memcpy(&metafile.length, data, sizeof(metafile.length));
metafile.source = (unsigned char *) data + 4;
metafile.source = (unsigned char *) data + sizeof(metafile.length);
if (parse_bittorrent_metafile(&meta, &metafile) != BITTORRENT_STATE_OK) {
done_bittorrent_meta(&meta);