RFC Errata


Errata Search

 
Source of RFC  
Summary Table Full Records

RFC 1071, "Computing the Internet checksum", September 1988

Source of RFC: Legacy
Area Assignment: int

Errata ID: 4918
Status: Reported
Type: Editorial
Publication Format(s) : TEXT

Reported By: Cihangir Akturk
Date Reported: 2017-01-26

Section 4.1 says:

while( count > 1 )  {
        /*  This is the inner loop */
        sum += * (unsigned short) addr++;
        count -= 2;
}

It should say:

while( count > 1 )  {
        /*  This is the inner loop */
        sum += * (unsigned short *) addr;
        addr += 2;
        count -= 2;
}

Notes:

- In the original text, code incorrectly casts from pointer to integer.
- Increments addr pointer by 1. Because unsigned short is two bytes, it should have been incremented by 2 instead.

Report New Errata