Skip to content
Snippets Groups Projects
Commit f4753d2f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use the pointer *after* checking that its not NULL

Fixes CID 351271
parent 557049bf
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2949 failed
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment