Commit f4753d2f authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Use the pointer *after* checking that its not NULL

Fixes CID 351271
parent 557049bf
Pipeline #2949 failed with stage
in 9 minutes and 56 seconds
......@@ -314,9 +314,10 @@ int globi(const char *p, int flags,
{
char pattern[MAX_PATH * 2] = "";
int len = 0;
char* fname = getfname(p);
char* fname;
if(p != NULL) {
fname = getfname(p);
while(*p != '\0' && len < MAX_PATH) {
if(p >= fname && IS_ALPHA(*p))
len += sprintf(pattern + len, "[%c%c]", toupper(*p), tolower(*p));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment