1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Info Panel: Fix uninitialized posn variable

This commit is contained in:
David Maciejak
2023-02-16 17:09:52 +08:00
committed by Carlos R. Mafra
parent 370adc94e7
commit 6d6f9f6ff5

View File

@@ -1209,13 +1209,12 @@ char *getPrettyOSName(void)
if ((c = *src++) == '\0')
break;
*dst++ = c;
}
else if (c != '"' && c != '\'')
} else if (c != '"' && c != '\'')
*dst++ = c;
}
*dst = '\0';
posn = malloc(strlen(token));
strncpy(posn, token, strlen(token));
posn = wmalloc(strlen(token) + 1);
strcpy(posn, token);
}
}
break;