Skip to content

Commit

Permalink
lib/ec_glob: plug leak of nums utarray
Browse files Browse the repository at this point in the history
  • Loading branch information
chergert committed Jun 12, 2024
1 parent cfb7efd commit a267a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/ec_glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ static const UT_icd ut_int_pair_icd = {sizeof(int_pair),NULL,NULL,NULL};
size_t string_len = strlen(string); \
assert(end > p); \
if (string_len >= (size_t)(end - p)) \
return -1; \
goto cleanup; \
strcat(p, string); \
p += string_len; \
} while(0)

/* safely add a char to a string then move the pointer to the end */
#define ADD_CHAR(string, new_chr, end) do { \
if (string + 1 >= end) \
return -1; \
goto cleanup; \
*(string ++) = new_chr; \
} while(0)

Expand Down

0 comments on commit a267a54

Please sign in to comment.