Changeset 536 in openpam for trunk/lib/openpam_straddch.c


Ignore:
Timestamp:
Mar 31, 2012, 3:34:19 PM (3 years ago)
Author:
des
Message:

Avoid underflow if *size == 0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_straddch.c

    r535 r536  
    6262                *size = tmpsize; 
    6363                *len = 0; 
    64         } else if (*len >= *size - 1) { 
     64        } else if (*len + 1 >= *size) { 
    6565                /* additional space required */ 
    6666                tmpsize = *size * 2; 
Note: See TracChangeset for help on using the changeset viewer.