memory: fix the potential overflow in a generic manner
modified libpkg/utils.c
@@ -928,8 +928,9 @@ append_random_suffix(char *buf, int buflen, int suflen)
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -978,7 +979,7 @@ hidden_tempfile(char *buf, int buflen, const char *path)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified tests/lib/utils.c
@@ -61,7 +61,7 @@ ATF_TC_BODY(random_suffix, tc) {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|