Changeset 5155:736653ce1896

Show
Ignore:
Timestamp:
2007-05-22 15:32:47 (20 months ago)
Author:
Jonathan Smith <https://issues.rpath.com/>
Branch:
mutt-1-4-stable
Message:

merge changeset 47d08903b79b: Use signed arithmetic in mutt_gecos_name to avoid an overflow. Closes #2885.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • muttlib.c

    r2829 r5155  
    515515    { 
    516516      memmove (&dest[idx + pwnl], &dest[idx + 1], 
    517                MAX(destlen - idx - pwnl - 1, 0)); 
     517               MAX((ssize_t)(destlen - idx - pwnl - 1), 0)); 
    518518      memcpy (&dest[idx], pw->pw_name, MIN(destlen - idx - 1, pwnl)); 
    519519      dest[idx] = toupper (dest[idx]);