Skip to content

Commit

Permalink
Reduce scope of p so it can't be used after buffer goes out of scope
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 25, 2017
1 parent e0a8400 commit 294a9a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/exec.c
Expand Up @@ -75,7 +75,6 @@ pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
VALUE_PAIR *input_pairs, bool shell_escape)
{
#ifndef __MINGW32__
char *p;
VALUE_PAIR *vp;
int n;
int to_child[2] = {-1, -1};
Expand Down Expand Up @@ -134,8 +133,9 @@ pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
envp[0] = NULL;

if (input_pairs) {
vp_cursor_t cursor;
char buffer[1024];
char *p;
vp_cursor_t cursor;
char buffer[1024];

input_ctx = talloc_new(request);

Expand Down

0 comments on commit 294a9a8

Please sign in to comment.