summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index ef19439a48..7700f0ff82 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -2726,6 +2726,9 @@ NetLibAsciiStrToIp4 (
TempStr = Ip4Str;
while ((*Ip4Str != '\0') && (*Ip4Str != '.')) {
+ if (!NET_IS_DIGIT (*Ip4Str)) {
+ return EFI_INVALID_PARAMETER;
+ }
Ip4Str++;
}