Changeset 5155:736653ce1896
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r2829
|
r5155
|
|
| 515 | 515 | { |
| 516 | 516 | memmove (&dest[idx + pwnl], &dest[idx + 1], |
| 517 | | MAX(destlen - idx - pwnl - 1, 0)); |
| | 517 | MAX((ssize_t)(destlen - idx - pwnl - 1), 0)); |
| 518 | 518 | memcpy (&dest[idx], pw->pw_name, MIN(destlen - idx - 1, pwnl)); |
| 519 | 519 | dest[idx] = toupper (dest[idx]); |