[UDM] Prevent crash by limiting the number of TOKENs (#3564)

we modified the ogs_supi_from_suci function to prevent the crash
by limiting the number of tokens parsed
This commit is contained in:
Sukchan Lee
2024-11-11 16:09:45 +09:00
parent e227d57972
commit 51fd59e7cf

View File

@@ -103,7 +103,7 @@ char *ogs_supi_from_suci(char *suci)
p = tmp;
i = 0;
while((array[i++] = strsep(&p, "-"))) {
while((i < MAX_SUCI_TOKEN) && (array[i++] = strsep(&p, "-"))) {
/* Empty Body */
}