Skip to content

Commit

Permalink
Fix uninitialized variables causing segfault
Browse files Browse the repository at this point in the history
Closes #131
  • Loading branch information
hackerb9 committed Jan 29, 2022
1 parent faeebf2 commit b372f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xclip.c
Expand Up @@ -353,7 +353,7 @@ doOptTarget(void)
static int
doIn(Window win, const char *progname)
{
unsigned char *sel_buf; /* buffer for selection data */
unsigned char *sel_buf = NULL; /* buffer for selection data */
unsigned long sel_len = 0; /* length of sel_buf */
unsigned long sel_all = 0; /* allocated size of sel_buf */
XEvent evt; /* X Event Structures */
Expand Down Expand Up @@ -714,7 +714,7 @@ static int
doOut(Window win)
{
Atom sel_type = None;
unsigned char *sel_buf; /* buffer for selection data */
unsigned char *sel_buf = NULL; /* buffer for selection data */
unsigned long sel_len = 0; /* length of sel_buf */
XEvent evt; /* X Event Structures */
unsigned int context = XCLIB_XCOUT_NONE;
Expand Down

0 comments on commit b372f73

Please sign in to comment.