From 51159b0e8c00533bcf360fdd28224c77081947b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Wed, 2 Oct 2002 18:28:38 +0000 Subject: [PATCH] read_line() always null-terminates string git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2481 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/settings.c b/apps/settings.c index ad651a9393..a66a8b1acf 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -483,6 +483,8 @@ static int read_line(int fd, char* buffer, int buffer_size) if ( count < buffer_size ) buffer[count] = 0; + else + buffer[buffer_size-1] = 0; return count; }