diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-10-02 18:28:38 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-10-02 18:28:38 +0000 |
commit | 51159b0e8c00533bcf360fdd28224c77081947b1 (patch) | |
tree | b6091e8b09fb959e22762876539a3be4d66b9b06 /apps/settings.c | |
parent | bde60b66d1e2ee5a5e735257bcf7e95e99e0a746 (diff) |
read_line() always null-terminates string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2481 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |