Skip to content

Commit

Permalink
Increase command output buffer size.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemann committed Jun 11, 2024
1 parent 781c6b9 commit 7f82bb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <errno.h>
#include <ctype.h>

#define CMD_BUFFER_SIZE 4096

/**
* Simply lower-cases a string.
*
Expand Down Expand Up @@ -93,9 +95,9 @@ char *trim(char* str)
char *execcmd(const char *cmd)
{
FILE* fp;
char buffer[128];
char buffer[CMD_BUFFER_SIZE];
size_t size = 0;
size_t buffer_size = 128;
size_t buffer_size = CMD_BUFFER_SIZE;
char* result = malloc(buffer_size);

if (result == NULL)
Expand Down

0 comments on commit 7f82bb3

Please sign in to comment.