summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hashtable.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 2d1ff87cb..0664c3694 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -1276,6 +1276,15 @@ printaliasnode(HashNode hn, int printflags)
}
if (printflags & PRINT_LIST) {
+ /* Fast fail on unrepresentable values. */
+ if (strchr(a->node.nam, '=')) {
+ zwarn("invalid alias '%s' encountered while printing aliases",
+ a->node.nam);
+ /* ### TODO: Return an error status to the C caller */
+ return;
+ }
+
+ /* Normal path. */
printf("alias ");
if (a->node.flags & ALIAS_SUFFIX)
printf("-s ");