diff options
Diffstat (limited to 'lib-src/ChangeLog')
| -rw-r--r-- | lib-src/ChangeLog | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index dc4ec91c512..50273e2a60a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,36 @@ | |||
| 1 | 2014-01-19 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | update-game-score fixes for -m and integer overflow (Bug#16428) | ||
| 4 | * update-game-score.c: Include inttypes.h, stdbool.h. | ||
| 5 | (min): New macro, if not already defined. | ||
| 6 | (MAX_SCORES, main): Limit the maximum number of scores only from | ||
| 7 | limits imposed by the underyling platform, instead of the | ||
| 8 | arbitrary value 200. | ||
| 9 | (struct score_entry, main, read_score, write_score): | ||
| 10 | Scores are now intmax_t, not long. | ||
| 11 | (get_user_id): Reject user names containing spaces or newlines, | ||
| 12 | as they would mess up the score file. | ||
| 13 | Allow uids that don't fit in 'long'. | ||
| 14 | Increase the size of the buffer, to avoid overrun in weird cases. | ||
| 15 | (get_prefix, main): Use bool for boolean. | ||
| 16 | (main): Rewrite expr to avoid possibility of signed integer | ||
| 17 | overflow. Don't allow newlines in data, as this would mess up | ||
| 18 | the score file. Check for memory allocation failure when adding | ||
| 19 | the new score, or when unlockint the file. Implement -m. | ||
| 20 | (read_score): Check for integer overflow when reading a score. | ||
| 21 | (read_score) [!HAVE_GETDELIM]: Check for integer overflow when | ||
| 22 | data gets very long. Check only for space to delimit names, | ||
| 23 | since that's what's done in the HAVE_GETDELIM case. | ||
| 24 | (read_scores): New parameter ALLOC. Change counts to ptrdiff_t. | ||
| 25 | All uses changed. Use push_score to add individual scores; | ||
| 26 | that's simpler than repeating its contents. | ||
| 27 | (score_compare_reverse): Simplify. | ||
| 28 | (push_score): New parameter SIZE. Change counts to ptrdiff_t. | ||
| 29 | All uses changed. Check for integer overflow of size calculation. | ||
| 30 | (sort_scores, write_scores): Change counts to ptrdiff_t. | ||
| 31 | (unlock_file): Preserve errno on success, so that storage | ||
| 32 | exhaustion is diagnosed correctly. | ||
| 33 | |||
| 1 | 2014-01-05 Paul Eggert <eggert@cs.ucla.edu> | 34 | 2014-01-05 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 35 | ||
| 3 | Spelling fixes. | 36 | Spelling fixes. |