Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/poudriere-sh/mapfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poudriere-sh/mapfile.c b/src/poudriere-sh/mapfile.c
index e88b43d4..9c318b0c 100644
--- a/src/poudriere-sh/mapfile.c
+++ b/src/poudriere-sh/mapfile.c
@@ -134,7 +134,7 @@ mapfilecmd(int argc, char **argv)
break;
}
}
- if (mapped_files[nextidx] != NULL)
+ if (nextidx == -1 || mapped_files[nextidx] != NULL)
errx(EX_SOFTWARE, "%s", "mapped files stack exceeded");
file = argv[2];