diff options
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xpsmem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xps/xpsmem.c b/xps/xpsmem.c index e9fb9c8f3..82881e089 100644 --- a/xps/xpsmem.c +++ b/xps/xpsmem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -107,7 +107,8 @@ xps_clean_path(char *name) } } - if (q == name) /* empty string is really "." */ + /* Guard against the 'blah:' case, where name == terminator. */ + if (q == name && *q != 0) /* empty string is really "." */ *q++ = '.'; *q = '\0'; |