diff options
Diffstat (limited to 'lib-src/update-game-score.c')
-rw-r--r-- | lib-src/update-game-score.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 8a6f46b38e7..782425186e8 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -240,7 +240,7 @@ main (int argc, char **argv) if (! user) lose_syserr ("Couldn't determine user id"); data = argv[optind + 2]; - if (strlen (data) > MAX_DATA_LEN) + if (strnlen (data, MAX_DATA_LEN + 1) == MAX_DATA_LEN + 1) data[MAX_DATA_LEN] = '\0'; nl = strchr (data, '\n'); if (nl) |