mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-23 07:41:57 +00:00
[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:
@@ -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 */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user