make PATH_MAX consistent across all buffers throughout the code

Tento commit je obsažen v:
Albert S. 2019-11-10 12:29:46 +01:00
rodič 338e578350
revize 8298a30e7c

4
qssb.h
Zobrazit soubor

@ -113,7 +113,7 @@ int random_string(char *buffer, size_t buffer_length)
* */
static int mkdir_structure(const char *p, mode_t mode)
{
char path[PATH_MAX + 2] = { 0 };
char path[PATH_MAX] = { 0 };
snprintf(path, sizeof(path), "%s/", p);
char *begin = path;
@ -166,7 +166,7 @@ static int mount_to_chroot(const char *chroot_target_path, char **paths, unsigne
char *path = *paths;
while(path != NULL)
{
char path_inside_chroot[PATH_MAX + 1];
char path_inside_chroot[PATH_MAX];
snprintf(path_inside_chroot, sizeof(path_inside_chroot), "%s/%s", chroot_target_path, path);
int ret = mkdir_structure(path_inside_chroot, 0700);
if(ret < 0)