TFTP: block id wrap bug fix

In a normal expression, doing [unsigned short] + 1 will not wrap
at 16 bits so the comparisons and outputs were done wrong. I
added a macro do make sure it gets done right.

Douglas Kilpatrick filed bug report #3004787 about it:
http://curl.haxx.se/bug/view.cgi?id=3004787
This commit is contained in:
Daniel Stenberg
2010-05-21 23:04:15 +02:00
parent 700335103e
commit 0a29e2445c
3 changed files with 19 additions and 8 deletions

View File

@@ -6,6 +6,12 @@
Changelog
Daniel Stenberg (21 May 2010)
- Douglas Kilpatrick filed bug report #3004787 and pointed out that the TFTP
code didn't handle block id wraps correctly. His suggested fix inspired the
fix I committed.
(http://curl.haxx.se/bug/view.cgi?id=3004787)
Daniel Stenberg (20 May 2010)
- Tanguy Fautre brought a fix to allow curl to build with Microsoft VC10.