diff options
author | Leandro Nini <drfiemost@users.noreply.github.com> | 2023-03-29 19:16:45 +0200 |
---|---|---|
committer | Leandro Nini <drfiemost@users.noreply.github.com> | 2023-03-29 19:16:45 +0200 |
commit | 04f5a82fc9b6ffab4d3c1630c220298d72a516bf (patch) | |
tree | ebf88a8b87d531d71c9ad0c4616f17c5f4d83a0b /src | |
parent | 4f7a1d0a02faf0abe969e11053ae7b2a567bc345 (diff) | |
download | cracklib-04f5a82fc9b6ffab4d3c1630c220298d72a516bf.tar.gz |
Make buffer static and avoid returning stack-allocated memory
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/rules.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/rules.c b/src/lib/rules.c index 094a36b..3c587c4 100644 --- a/src/lib/rules.c +++ b/src/lib/rules.c @@ -213,7 +213,7 @@ Purge(string, target) /* returns pointer to a purged copy */ char target; { char *ptr; - char area[STRINGSIZE]; + static char area[STRINGSIZE]; ptr = area; while (*string) { |