Ensures buffer is 0-terminated.
* glibtop_private.c: (try_file_to_buffer): Ensures buffer is 0-terminated.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2005-06-13 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* glibtop_private.c: (try_file_to_buffer): Ensures buffer is 0-terminated.
|
||||
|
||||
2005-06-13 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* swap.c: (glibtop_get_swap_s): Added pagein/pageout for linux 2.6.
|
||||
|
@@ -66,6 +66,8 @@ int try_file_to_buffer(char *buffer, const char *format, ...)
|
||||
|
||||
va_end(pa);
|
||||
|
||||
buffer [0] = '\0';
|
||||
|
||||
if((fd = open (path, O_RDONLY)) < 0)
|
||||
return TRY_FILE_TO_BUFFER_OPEN;
|
||||
|
||||
|
Reference in New Issue
Block a user