make sure old_pid_buffer is null terminated

This commit is contained in:
Michael Jerris 2014-04-30 16:36:14 -04:00
parent a1a397420e
commit ef18915ca5
1 changed files with 1 additions and 1 deletions

View File

@ -1140,7 +1140,7 @@ int main(int argc, char *argv[])
if (switch_file_open(&fd, pid_path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, pool) == SWITCH_STATUS_SUCCESS) {
old_pid_len = sizeof(old_pid_buffer);
old_pid_len = sizeof(old_pid_buffer) -1;
switch_file_read(fd, old_pid_buffer, &old_pid_len);
switch_file_close(fd);
}